com.amazonaws.services.directconnect.model.CreateLagRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directconnect Show documentation
/*
* Copyright 2013-2018 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;
/**
*
* Container for the parameters to the CreateLag operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateLagRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The number of physical connections initially provisioned and bundled by the LAG.
*
*
* Default: None
*
*/
private Integer numberOfConnections;
/**
*
* The AWS Direct Connect location in which the LAG should be allocated.
*
*
* Example: EqSV5
*
*
* Default: None
*
*/
private String location;
/**
*
* The bandwidth of the individual physical connections bundled by the LAG.
*
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*
*/
private String connectionsBandwidth;
/**
*
* The name of the LAG.
*
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*
*/
private String lagName;
/**
*
* The ID of an existing connection to migrate to the LAG.
*
*
* Default: None
*
*/
private String connectionId;
/**
*
* The number of physical connections initially provisioned and bundled by the LAG.
*
*
* Default: None
*
*
* @param numberOfConnections
* The number of physical connections initially provisioned and bundled by the LAG.
*
* Default: None
*/
public void setNumberOfConnections(Integer numberOfConnections) {
this.numberOfConnections = numberOfConnections;
}
/**
*
* The number of physical connections initially provisioned and bundled by the LAG.
*
*
* Default: None
*
*
* @return The number of physical connections initially provisioned and bundled by the LAG.
*
* Default: None
*/
public Integer getNumberOfConnections() {
return this.numberOfConnections;
}
/**
*
* The number of physical connections initially provisioned and bundled by the LAG.
*
*
* Default: None
*
*
* @param numberOfConnections
* The number of physical connections initially provisioned and bundled by the LAG.
*
* Default: None
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLagRequest withNumberOfConnections(Integer numberOfConnections) {
setNumberOfConnections(numberOfConnections);
return this;
}
/**
*
* The AWS Direct Connect location in which the LAG should be allocated.
*
*
* Example: EqSV5
*
*
* Default: None
*
*
* @param location
* The AWS Direct Connect location in which the LAG should be allocated.
*
* Example: EqSV5
*
*
* Default: None
*/
public void setLocation(String location) {
this.location = location;
}
/**
*
* The AWS Direct Connect location in which the LAG should be allocated.
*
*
* Example: EqSV5
*
*
* Default: None
*
*
* @return The AWS Direct Connect location in which the LAG should be allocated.
*
* Example: EqSV5
*
*
* Default: None
*/
public String getLocation() {
return this.location;
}
/**
*
* The AWS Direct Connect location in which the LAG should be allocated.
*
*
* Example: EqSV5
*
*
* Default: None
*
*
* @param location
* The AWS Direct Connect location in which the LAG should be allocated.
*
* Example: EqSV5
*
*
* Default: None
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLagRequest withLocation(String location) {
setLocation(location);
return this;
}
/**
*
* The bandwidth of the individual physical connections bundled by the LAG.
*
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*
*
* @param connectionsBandwidth
* The bandwidth of the individual physical connections bundled by the LAG.
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*/
public void setConnectionsBandwidth(String connectionsBandwidth) {
this.connectionsBandwidth = connectionsBandwidth;
}
/**
*
* The bandwidth of the individual physical connections bundled by the LAG.
*
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*
*
* @return The bandwidth of the individual physical connections bundled by the LAG.
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*/
public String getConnectionsBandwidth() {
return this.connectionsBandwidth;
}
/**
*
* The bandwidth of the individual physical connections bundled by the LAG.
*
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
*
*
* @param connectionsBandwidth
* The bandwidth of the individual physical connections bundled by the LAG.
*
* Default: None
*
*
* Available values: 1Gbps, 10Gbps
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLagRequest withConnectionsBandwidth(String connectionsBandwidth) {
setConnectionsBandwidth(connectionsBandwidth);
return this;
}
/**
*
* The name of the LAG.
*
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*
*
* @param lagName
* The name of the LAG.
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*/
public void setLagName(String lagName) {
this.lagName = lagName;
}
/**
*
* The name of the LAG.
*
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*
*
* @return The name of the LAG.
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*/
public String getLagName() {
return this.lagName;
}
/**
*
* The name of the LAG.
*
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
*
*
* @param lagName
* The name of the LAG.
*
* Example: "3x10G LAG to AWS
"
*
*
* Default: None
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLagRequest withLagName(String lagName) {
setLagName(lagName);
return this;
}
/**
*
* The ID of an existing connection to migrate to the LAG.
*
*
* Default: None
*
*
* @param connectionId
* The ID of an existing connection to migrate to the LAG.
*
* Default: None
*/
public void setConnectionId(String connectionId) {
this.connectionId = connectionId;
}
/**
*
* The ID of an existing connection to migrate to the LAG.
*
*
* Default: None
*
*
* @return The ID of an existing connection to migrate to the LAG.
*
* Default: None
*/
public String getConnectionId() {
return this.connectionId;
}
/**
*
* The ID of an existing connection to migrate to the LAG.
*
*
* Default: None
*
*
* @param connectionId
* The ID of an existing connection to migrate to the LAG.
*
* Default: None
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLagRequest withConnectionId(String connectionId) {
setConnectionId(connectionId);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getNumberOfConnections() != null)
sb.append("NumberOfConnections: ").append(getNumberOfConnections()).append(",");
if (getLocation() != null)
sb.append("Location: ").append(getLocation()).append(",");
if (getConnectionsBandwidth() != null)
sb.append("ConnectionsBandwidth: ").append(getConnectionsBandwidth()).append(",");
if (getLagName() != null)
sb.append("LagName: ").append(getLagName()).append(",");
if (getConnectionId() != null)
sb.append("ConnectionId: ").append(getConnectionId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateLagRequest == false)
return false;
CreateLagRequest other = (CreateLagRequest) obj;
if (other.getNumberOfConnections() == null ^ this.getNumberOfConnections() == null)
return false;
if (other.getNumberOfConnections() != null && other.getNumberOfConnections().equals(this.getNumberOfConnections()) == 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.getConnectionsBandwidth() == null ^ this.getConnectionsBandwidth() == null)
return false;
if (other.getConnectionsBandwidth() != null && other.getConnectionsBandwidth().equals(this.getConnectionsBandwidth()) == false)
return false;
if (other.getLagName() == null ^ this.getLagName() == null)
return false;
if (other.getLagName() != null && other.getLagName().equals(this.getLagName()) == false)
return false;
if (other.getConnectionId() == null ^ this.getConnectionId() == null)
return false;
if (other.getConnectionId() != null && other.getConnectionId().equals(this.getConnectionId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNumberOfConnections() == null) ? 0 : getNumberOfConnections().hashCode());
hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode());
hashCode = prime * hashCode + ((getConnectionsBandwidth() == null) ? 0 : getConnectionsBandwidth().hashCode());
hashCode = prime * hashCode + ((getLagName() == null) ? 0 : getLagName().hashCode());
hashCode = prime * hashCode + ((getConnectionId() == null) ? 0 : getConnectionId().hashCode());
return hashCode;
}
@Override
public CreateLagRequest clone() {
return (CreateLagRequest) super.clone();
}
}