com.amazonaws.services.globalaccelerator.model.Accelerator Maven / Gradle / Ivy
Show all versions of aws-java-sdk-globalaccelerator Show documentation
/*
* Copyright 2014-2019 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.globalaccelerator.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An accelerator is a complex type that includes one or more listeners that process inbound connections and then direct
* traffic to one or more endpoint groups, each of which includes endpoints, such as load balancers.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Accelerator implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the accelerator.
*
*/
private String acceleratorArn;
/**
*
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must not
* begin or end with a hyphen.
*
*/
private String name;
/**
*
* The value for the address type must be IPv4.
*
*/
private String ipAddressType;
/**
*
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.
*
*/
private Boolean enabled;
/**
*
* The static IP addresses that Global Accelerator associates with the accelerator.
*
*/
private java.util.List ipSets;
/**
*
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP
* addresses.
*
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer Guide.
*
*/
private String dnsName;
/**
*
* Describes the deployment status of the accelerator.
*
*/
private String status;
/**
*
* The date and time that the accelerator was created.
*
*/
private java.util.Date createdTime;
/**
*
* The date and time that the accelerator was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The Amazon Resource Name (ARN) of the accelerator.
*
*
* @param acceleratorArn
* The Amazon Resource Name (ARN) of the accelerator.
*/
public void setAcceleratorArn(String acceleratorArn) {
this.acceleratorArn = acceleratorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the accelerator.
*
*
* @return The Amazon Resource Name (ARN) of the accelerator.
*/
public String getAcceleratorArn() {
return this.acceleratorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the accelerator.
*
*
* @param acceleratorArn
* The Amazon Resource Name (ARN) of the accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withAcceleratorArn(String acceleratorArn) {
setAcceleratorArn(acceleratorArn);
return this;
}
/**
*
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must not
* begin or end with a hyphen.
*
*
* @param name
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must
* not begin or end with a hyphen.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must not
* begin or end with a hyphen.
*
*
* @return The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must
* not begin or end with a hyphen.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must not
* begin or end with a hyphen.
*
*
* @param name
* The name of the accelerator. The name must contain only alphanumeric characters or hyphens (-), and must
* not begin or end with a hyphen.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withName(String name) {
setName(name);
return this;
}
/**
*
* The value for the address type must be IPv4.
*
*
* @param ipAddressType
* The value for the address type must be IPv4.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The value for the address type must be IPv4.
*
*
* @return The value for the address type must be IPv4.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The value for the address type must be IPv4.
*
*
* @param ipAddressType
* The value for the address type must be IPv4.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public Accelerator withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The value for the address type must be IPv4.
*
*
* @param ipAddressType
* The value for the address type must be IPv4.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public Accelerator withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.
*
*
* @param enabled
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be
* deleted.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.
*
*
* @return Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be
* deleted.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.
*
*
* @param enabled
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be
* deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.
*
*
* @return Indicates whether the accelerator is enabled. The value is true or false. The default value is true.
*
* If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be
* deleted.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
*
* The static IP addresses that Global Accelerator associates with the accelerator.
*
*
* @return The static IP addresses that Global Accelerator associates with the accelerator.
*/
public java.util.List getIpSets() {
return ipSets;
}
/**
*
* The static IP addresses that Global Accelerator associates with the accelerator.
*
*
* @param ipSets
* The static IP addresses that Global Accelerator associates with the accelerator.
*/
public void setIpSets(java.util.Collection ipSets) {
if (ipSets == null) {
this.ipSets = null;
return;
}
this.ipSets = new java.util.ArrayList(ipSets);
}
/**
*
* The static IP addresses that Global Accelerator associates with the accelerator.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIpSets(java.util.Collection)} or {@link #withIpSets(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param ipSets
* The static IP addresses that Global Accelerator associates with the accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withIpSets(IpSet... ipSets) {
if (this.ipSets == null) {
setIpSets(new java.util.ArrayList(ipSets.length));
}
for (IpSet ele : ipSets) {
this.ipSets.add(ele);
}
return this;
}
/**
*
* The static IP addresses that Global Accelerator associates with the accelerator.
*
*
* @param ipSets
* The static IP addresses that Global Accelerator associates with the accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withIpSets(java.util.Collection ipSets) {
setIpSets(ipSets);
return this;
}
/**
*
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP
* addresses.
*
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer Guide.
*
*
* @param dnsName
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static
* IP addresses.
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer
* Guide.
*/
public void setDnsName(String dnsName) {
this.dnsName = dnsName;
}
/**
*
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP
* addresses.
*
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer Guide.
*
*
* @return The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's
* static IP addresses.
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer
* Guide.
*/
public String getDnsName() {
return this.dnsName;
}
/**
*
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP
* addresses.
*
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer Guide.
*
*
* @param dnsName
* The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static
* IP addresses.
*
* The naming convention for the DNS name is: a lower case letter a, followed by a 16-bit random hex string,
* followed by .awsglobalaccelerator.com. For example: a1234567890abcdef.awsglobalaccelerator.com.
*
*
* For more information about the default DNS name, see Support for DNS Addressing in Global Accelerator in the AWS Global Accelerator Developer
* Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withDnsName(String dnsName) {
setDnsName(dnsName);
return this;
}
/**
*
* Describes the deployment status of the accelerator.
*
*
* @param status
* Describes the deployment status of the accelerator.
* @see AcceleratorStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* Describes the deployment status of the accelerator.
*
*
* @return Describes the deployment status of the accelerator.
* @see AcceleratorStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* Describes the deployment status of the accelerator.
*
*
* @param status
* Describes the deployment status of the accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorStatus
*/
public Accelerator withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* Describes the deployment status of the accelerator.
*
*
* @param status
* Describes the deployment status of the accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorStatus
*/
public Accelerator withStatus(AcceleratorStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The date and time that the accelerator was created.
*
*
* @param createdTime
* The date and time that the accelerator was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* The date and time that the accelerator was created.
*
*
* @return The date and time that the accelerator was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* The date and time that the accelerator was created.
*
*
* @param createdTime
* The date and time that the accelerator was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* The date and time that the accelerator was last modified.
*
*
* @param lastModifiedTime
* The date and time that the accelerator was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The date and time that the accelerator was last modified.
*
*
* @return The date and time that the accelerator was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The date and time that the accelerator was last modified.
*
*
* @param lastModifiedTime
* The date and time that the accelerator was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Accelerator withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
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 (getAcceleratorArn() != null)
sb.append("AcceleratorArn: ").append(getAcceleratorArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getIpAddressType() != null)
sb.append("IpAddressType: ").append(getIpAddressType()).append(",");
if (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getIpSets() != null)
sb.append("IpSets: ").append(getIpSets()).append(",");
if (getDnsName() != null)
sb.append("DnsName: ").append(getDnsName()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Accelerator == false)
return false;
Accelerator other = (Accelerator) obj;
if (other.getAcceleratorArn() == null ^ this.getAcceleratorArn() == null)
return false;
if (other.getAcceleratorArn() != null && other.getAcceleratorArn().equals(this.getAcceleratorArn()) == 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.getIpAddressType() == null ^ this.getIpAddressType() == null)
return false;
if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false)
return false;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
return false;
if (other.getIpSets() == null ^ this.getIpSets() == null)
return false;
if (other.getIpSets() != null && other.getIpSets().equals(this.getIpSets()) == false)
return false;
if (other.getDnsName() == null ^ this.getDnsName() == null)
return false;
if (other.getDnsName() != null && other.getDnsName().equals(this.getDnsName()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAcceleratorArn() == null) ? 0 : getAcceleratorArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode());
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
hashCode = prime * hashCode + ((getIpSets() == null) ? 0 : getIpSets().hashCode());
hashCode = prime * hashCode + ((getDnsName() == null) ? 0 : getDnsName().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
return hashCode;
}
@Override
public Accelerator clone() {
try {
return (Accelerator) 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.globalaccelerator.model.transform.AcceleratorMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}