com.amazonaws.services.globalaccelerator.model.UpdateCustomRoutingAcceleratorRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-globalaccelerator Show documentation
/*
* Copyright 2019-2024 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.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateCustomRoutingAcceleratorRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the accelerator to update.
*
*/
private String acceleratorArn;
/**
*
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*
*/
private String name;
/**
*
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
*
*/
private String ipAddressType;
/**
*
* The IP addresses for an accelerator.
*
*/
private java.util.List ipAddresses;
/**
*
* Indicates whether an 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, the accelerator can be deleted.
*
*/
private Boolean enabled;
/**
*
* The Amazon Resource Name (ARN) of the accelerator to update.
*
*
* @param acceleratorArn
* The Amazon Resource Name (ARN) of the accelerator to update.
*/
public void setAcceleratorArn(String acceleratorArn) {
this.acceleratorArn = acceleratorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the accelerator to update.
*
*
* @return The Amazon Resource Name (ARN) of the accelerator to update.
*/
public String getAcceleratorArn() {
return this.acceleratorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the accelerator to update.
*
*
* @param acceleratorArn
* The Amazon Resource Name (ARN) of the accelerator to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCustomRoutingAcceleratorRequest withAcceleratorArn(String acceleratorArn) {
setAcceleratorArn(acceleratorArn);
return this;
}
/**
*
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*
*
* @param name
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*
*
* @return The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
*
*
* @param name
* The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric
* characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCustomRoutingAcceleratorRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
*
*
* @param ipAddressType
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be
* IPV4.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
*
*
* @return The IP address type that an accelerator supports. For a custom routing accelerator, the value must be
* IPV4.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
*
*
* @param ipAddressType
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be
* IPV4.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public UpdateCustomRoutingAcceleratorRequest withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be IPV4.
*
*
* @param ipAddressType
* The IP address type that an accelerator supports. For a custom routing accelerator, the value must be
* IPV4.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public UpdateCustomRoutingAcceleratorRequest withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The IP addresses for an accelerator.
*
*
* @return The IP addresses for an accelerator.
*/
public java.util.List getIpAddresses() {
return ipAddresses;
}
/**
*
* The IP addresses for an accelerator.
*
*
* @param ipAddresses
* The IP addresses for an accelerator.
*/
public void setIpAddresses(java.util.Collection ipAddresses) {
if (ipAddresses == null) {
this.ipAddresses = null;
return;
}
this.ipAddresses = new java.util.ArrayList(ipAddresses);
}
/**
*
* The IP addresses for an accelerator.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIpAddresses(java.util.Collection)} or {@link #withIpAddresses(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param ipAddresses
* The IP addresses for an accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCustomRoutingAcceleratorRequest withIpAddresses(String... ipAddresses) {
if (this.ipAddresses == null) {
setIpAddresses(new java.util.ArrayList(ipAddresses.length));
}
for (String ele : ipAddresses) {
this.ipAddresses.add(ele);
}
return this;
}
/**
*
* The IP addresses for an accelerator.
*
*
* @param ipAddresses
* The IP addresses for an accelerator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCustomRoutingAcceleratorRequest withIpAddresses(java.util.Collection ipAddresses) {
setIpAddresses(ipAddresses);
return this;
}
/**
*
* Indicates whether an 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, the accelerator can be deleted.
*
*
* @param enabled
* Indicates whether an 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, the accelerator can be
* deleted.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* Indicates whether an 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, the accelerator can be deleted.
*
*
* @return Indicates whether an 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, the accelerator can be
* deleted.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* Indicates whether an 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, the accelerator can be deleted.
*
*
* @param enabled
* Indicates whether an 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, the accelerator can be
* deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCustomRoutingAcceleratorRequest withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* Indicates whether an 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, the accelerator can be deleted.
*
*
* @return Indicates whether an 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, the accelerator can be
* deleted.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
* 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 (getIpAddresses() != null)
sb.append("IpAddresses: ").append(getIpAddresses()).append(",");
if (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateCustomRoutingAcceleratorRequest == false)
return false;
UpdateCustomRoutingAcceleratorRequest other = (UpdateCustomRoutingAcceleratorRequest) 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.getIpAddresses() == null ^ this.getIpAddresses() == null)
return false;
if (other.getIpAddresses() != null && other.getIpAddresses().equals(this.getIpAddresses()) == false)
return false;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == 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 + ((getIpAddresses() == null) ? 0 : getIpAddresses().hashCode());
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
return hashCode;
}
@Override
public UpdateCustomRoutingAcceleratorRequest clone() {
return (UpdateCustomRoutingAcceleratorRequest) super.clone();
}
}