com.amazonaws.services.directconnect.model.UpdateLagRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-directconnect Show documentation
/*
* Copyright 2017-2022 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 UpdateLagRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the LAG.
*
*/
private String lagId;
/**
*
* The name of the LAG.
*
*/
private String lagName;
/**
*
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
*
*/
private Integer minimumLinks;
/**
*
* The LAG MAC Security (MACsec) encryption mode.
*
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*
*/
private String encryptionMode;
/**
*
* 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 UpdateLagRequest withLagId(String lagId) {
setLagId(lagId);
return this;
}
/**
*
* The name of the LAG.
*
*
* @param lagName
* The name of the LAG.
*/
public void setLagName(String lagName) {
this.lagName = lagName;
}
/**
*
* The name of the LAG.
*
*
* @return The name of the LAG.
*/
public String getLagName() {
return this.lagName;
}
/**
*
* The name of the LAG.
*
*
* @param lagName
* The name of the LAG.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateLagRequest withLagName(String lagName) {
setLagName(lagName);
return this;
}
/**
*
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
*
*
* @param minimumLinks
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
*/
public void setMinimumLinks(Integer minimumLinks) {
this.minimumLinks = minimumLinks;
}
/**
*
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
*
*
* @return The minimum number of physical connections that must be operational for the LAG itself to be operational.
*/
public Integer getMinimumLinks() {
return this.minimumLinks;
}
/**
*
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
*
*
* @param minimumLinks
* The minimum number of physical connections that must be operational for the LAG itself to be operational.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateLagRequest withMinimumLinks(Integer minimumLinks) {
setMinimumLinks(minimumLinks);
return this;
}
/**
*
* The LAG MAC Security (MACsec) encryption mode.
*
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*
*
* @param encryptionMode
* The LAG MAC Security (MACsec) encryption mode.
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*/
public void setEncryptionMode(String encryptionMode) {
this.encryptionMode = encryptionMode;
}
/**
*
* The LAG MAC Security (MACsec) encryption mode.
*
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*
*
* @return The LAG MAC Security (MACsec) encryption mode.
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*/
public String getEncryptionMode() {
return this.encryptionMode;
}
/**
*
* The LAG MAC Security (MACsec) encryption mode.
*
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
*
*
* @param encryptionMode
* The LAG MAC Security (MACsec) encryption mode.
*
* Amazon Web Services applies the value to all connections which are part of the LAG.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateLagRequest withEncryptionMode(String encryptionMode) {
setEncryptionMode(encryptionMode);
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 (getLagId() != null)
sb.append("LagId: ").append(getLagId()).append(",");
if (getLagName() != null)
sb.append("LagName: ").append(getLagName()).append(",");
if (getMinimumLinks() != null)
sb.append("MinimumLinks: ").append(getMinimumLinks()).append(",");
if (getEncryptionMode() != null)
sb.append("EncryptionMode: ").append(getEncryptionMode());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateLagRequest == false)
return false;
UpdateLagRequest other = (UpdateLagRequest) obj;
if (other.getLagId() == null ^ this.getLagId() == null)
return false;
if (other.getLagId() != null && other.getLagId().equals(this.getLagId()) == 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.getMinimumLinks() == null ^ this.getMinimumLinks() == null)
return false;
if (other.getMinimumLinks() != null && other.getMinimumLinks().equals(this.getMinimumLinks()) == false)
return false;
if (other.getEncryptionMode() == null ^ this.getEncryptionMode() == null)
return false;
if (other.getEncryptionMode() != null && other.getEncryptionMode().equals(this.getEncryptionMode()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLagId() == null) ? 0 : getLagId().hashCode());
hashCode = prime * hashCode + ((getLagName() == null) ? 0 : getLagName().hashCode());
hashCode = prime * hashCode + ((getMinimumLinks() == null) ? 0 : getMinimumLinks().hashCode());
hashCode = prime * hashCode + ((getEncryptionMode() == null) ? 0 : getEncryptionMode().hashCode());
return hashCode;
}
@Override
public UpdateLagRequest clone() {
return (UpdateLagRequest) super.clone();
}
}