com.amazonaws.services.directconnect.model.CreateInterconnectRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directconnect 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.directconnect.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 CreateInterconnectRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the interconnect.
*
*/
private String interconnectName;
/**
*
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*
*/
private String bandwidth;
/**
*
* The location of the interconnect.
*
*/
private String location;
/**
*
* The ID of the LAG.
*
*/
private String lagId;
/**
*
* The tags to associate with the interconnect.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* The name of the service provider associated with the interconnect.
*
*/
private String providerName;
/**
*
* The name of the interconnect.
*
*
* @param interconnectName
* The name of the interconnect.
*/
public void setInterconnectName(String interconnectName) {
this.interconnectName = interconnectName;
}
/**
*
* The name of the interconnect.
*
*
* @return The name of the interconnect.
*/
public String getInterconnectName() {
return this.interconnectName;
}
/**
*
* The name of the interconnect.
*
*
* @param interconnectName
* The name of the interconnect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withInterconnectName(String interconnectName) {
setInterconnectName(interconnectName);
return this;
}
/**
*
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*
*
* @param bandwidth
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*/
public void setBandwidth(String bandwidth) {
this.bandwidth = bandwidth;
}
/**
*
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*
*
* @return The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*/
public String getBandwidth() {
return this.bandwidth;
}
/**
*
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
*
*
* @param bandwidth
* The port bandwidth, in Gbps. The possible values are 1, 10, and 100.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withBandwidth(String bandwidth) {
setBandwidth(bandwidth);
return this;
}
/**
*
* The location of the interconnect.
*
*
* @param location
* The location of the interconnect.
*/
public void setLocation(String location) {
this.location = location;
}
/**
*
* The location of the interconnect.
*
*
* @return The location of the interconnect.
*/
public String getLocation() {
return this.location;
}
/**
*
* The location of the interconnect.
*
*
* @param location
* The location of the interconnect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withLocation(String location) {
setLocation(location);
return this;
}
/**
*
* The ID of the LAG.
*
*
* @param lagId
* The ID of the LAG.
*/
public void setLagId(String lagId) {
this.lagId = lagId;
}
/**
*
* The ID of the LAG.
*
*
* @return The ID of the LAG.
*/
public String getLagId() {
return this.lagId;
}
/**
*
* The ID of the LAG.
*
*
* @param lagId
* The ID of the LAG.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withLagId(String lagId) {
setLagId(lagId);
return this;
}
/**
*
* The tags to associate with the interconnect.
*
*
* @return The tags to associate with the interconnect.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* The tags to associate with the interconnect.
*
*
* @param tags
* The tags to associate with the interconnect.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* The tags to associate with the interconnect.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tags to associate with the interconnect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags to associate with the interconnect.
*
*
* @param tags
* The tags to associate with the interconnect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The name of the service provider associated with the interconnect.
*
*
* @param providerName
* The name of the service provider associated with the interconnect.
*/
public void setProviderName(String providerName) {
this.providerName = providerName;
}
/**
*
* The name of the service provider associated with the interconnect.
*
*
* @return The name of the service provider associated with the interconnect.
*/
public String getProviderName() {
return this.providerName;
}
/**
*
* The name of the service provider associated with the interconnect.
*
*
* @param providerName
* The name of the service provider associated with the interconnect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInterconnectRequest withProviderName(String providerName) {
setProviderName(providerName);
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 (getInterconnectName() != null)
sb.append("InterconnectName: ").append(getInterconnectName()).append(",");
if (getBandwidth() != null)
sb.append("Bandwidth: ").append(getBandwidth()).append(",");
if (getLocation() != null)
sb.append("Location: ").append(getLocation()).append(",");
if (getLagId() != null)
sb.append("LagId: ").append(getLagId()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getProviderName() != null)
sb.append("ProviderName: ").append(getProviderName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateInterconnectRequest == false)
return false;
CreateInterconnectRequest other = (CreateInterconnectRequest) obj;
if (other.getInterconnectName() == null ^ this.getInterconnectName() == null)
return false;
if (other.getInterconnectName() != null && other.getInterconnectName().equals(this.getInterconnectName()) == false)
return false;
if (other.getBandwidth() == null ^ this.getBandwidth() == null)
return false;
if (other.getBandwidth() != null && other.getBandwidth().equals(this.getBandwidth()) == false)
return false;
if (other.getLocation() == null ^ this.getLocation() == null)
return false;
if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false)
return false;
if (other.getLagId() == null ^ this.getLagId() == null)
return false;
if (other.getLagId() != null && other.getLagId().equals(this.getLagId()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getProviderName() == null ^ this.getProviderName() == null)
return false;
if (other.getProviderName() != null && other.getProviderName().equals(this.getProviderName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInterconnectName() == null) ? 0 : getInterconnectName().hashCode());
hashCode = prime * hashCode + ((getBandwidth() == null) ? 0 : getBandwidth().hashCode());
hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode());
hashCode = prime * hashCode + ((getLagId() == null) ? 0 : getLagId().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getProviderName() == null) ? 0 : getProviderName().hashCode());
return hashCode;
}
@Override
public CreateInterconnectRequest clone() {
return (CreateInterconnectRequest) super.clone();
}
}