com.amazonaws.services.servermigration.model.Connector Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servermigration 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.servermigration.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Represents a connector.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Connector implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the connector.
*
*/
private String connectorId;
/**
*
* The connector version.
*
*/
private String version;
/**
*
* The status of the connector.
*
*/
private String status;
/**
*
* The capabilities of the connector.
*
*/
private java.util.List capabilityList;
/**
*
* The name of the VM manager.
*
*/
private String vmManagerName;
/**
*
* The VM management product.
*
*/
private String vmManagerType;
/**
*
* The ID of the VM manager.
*
*/
private String vmManagerId;
/**
*
* The IP address of the connector.
*
*/
private String ipAddress;
/**
*
* The MAC address of the connector.
*
*/
private String macAddress;
/**
*
* The time the connector was associated.
*
*/
private java.util.Date associatedOn;
/**
*
* The ID of the connector.
*
*
* @param connectorId
* The ID of the connector.
*/
public void setConnectorId(String connectorId) {
this.connectorId = connectorId;
}
/**
*
* The ID of the connector.
*
*
* @return The ID of the connector.
*/
public String getConnectorId() {
return this.connectorId;
}
/**
*
* The ID of the connector.
*
*
* @param connectorId
* The ID of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withConnectorId(String connectorId) {
setConnectorId(connectorId);
return this;
}
/**
*
* The connector version.
*
*
* @param version
* The connector version.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The connector version.
*
*
* @return The connector version.
*/
public String getVersion() {
return this.version;
}
/**
*
* The connector version.
*
*
* @param version
* The connector version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* The status of the connector.
*
*
* @param status
* The status of the connector.
* @see ConnectorStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the connector.
*
*
* @return The status of the connector.
* @see ConnectorStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the connector.
*
*
* @param status
* The status of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectorStatus
*/
public Connector withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the connector.
*
*
* @param status
* The status of the connector.
* @see ConnectorStatus
*/
public void setStatus(ConnectorStatus status) {
withStatus(status);
}
/**
*
* The status of the connector.
*
*
* @param status
* The status of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectorStatus
*/
public Connector withStatus(ConnectorStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The capabilities of the connector.
*
*
* @return The capabilities of the connector.
* @see ConnectorCapability
*/
public java.util.List getCapabilityList() {
return capabilityList;
}
/**
*
* The capabilities of the connector.
*
*
* @param capabilityList
* The capabilities of the connector.
* @see ConnectorCapability
*/
public void setCapabilityList(java.util.Collection capabilityList) {
if (capabilityList == null) {
this.capabilityList = null;
return;
}
this.capabilityList = new java.util.ArrayList(capabilityList);
}
/**
*
* The capabilities of the connector.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCapabilityList(java.util.Collection)} or {@link #withCapabilityList(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param capabilityList
* The capabilities of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectorCapability
*/
public Connector withCapabilityList(String... capabilityList) {
if (this.capabilityList == null) {
setCapabilityList(new java.util.ArrayList(capabilityList.length));
}
for (String ele : capabilityList) {
this.capabilityList.add(ele);
}
return this;
}
/**
*
* The capabilities of the connector.
*
*
* @param capabilityList
* The capabilities of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectorCapability
*/
public Connector withCapabilityList(java.util.Collection capabilityList) {
setCapabilityList(capabilityList);
return this;
}
/**
*
* The capabilities of the connector.
*
*
* @param capabilityList
* The capabilities of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConnectorCapability
*/
public Connector withCapabilityList(ConnectorCapability... capabilityList) {
java.util.ArrayList capabilityListCopy = new java.util.ArrayList(capabilityList.length);
for (ConnectorCapability value : capabilityList) {
capabilityListCopy.add(value.toString());
}
if (getCapabilityList() == null) {
setCapabilityList(capabilityListCopy);
} else {
getCapabilityList().addAll(capabilityListCopy);
}
return this;
}
/**
*
* The name of the VM manager.
*
*
* @param vmManagerName
* The name of the VM manager.
*/
public void setVmManagerName(String vmManagerName) {
this.vmManagerName = vmManagerName;
}
/**
*
* The name of the VM manager.
*
*
* @return The name of the VM manager.
*/
public String getVmManagerName() {
return this.vmManagerName;
}
/**
*
* The name of the VM manager.
*
*
* @param vmManagerName
* The name of the VM manager.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withVmManagerName(String vmManagerName) {
setVmManagerName(vmManagerName);
return this;
}
/**
*
* The VM management product.
*
*
* @param vmManagerType
* The VM management product.
* @see VmManagerType
*/
public void setVmManagerType(String vmManagerType) {
this.vmManagerType = vmManagerType;
}
/**
*
* The VM management product.
*
*
* @return The VM management product.
* @see VmManagerType
*/
public String getVmManagerType() {
return this.vmManagerType;
}
/**
*
* The VM management product.
*
*
* @param vmManagerType
* The VM management product.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VmManagerType
*/
public Connector withVmManagerType(String vmManagerType) {
setVmManagerType(vmManagerType);
return this;
}
/**
*
* The VM management product.
*
*
* @param vmManagerType
* The VM management product.
* @see VmManagerType
*/
public void setVmManagerType(VmManagerType vmManagerType) {
withVmManagerType(vmManagerType);
}
/**
*
* The VM management product.
*
*
* @param vmManagerType
* The VM management product.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VmManagerType
*/
public Connector withVmManagerType(VmManagerType vmManagerType) {
this.vmManagerType = vmManagerType.toString();
return this;
}
/**
*
* The ID of the VM manager.
*
*
* @param vmManagerId
* The ID of the VM manager.
*/
public void setVmManagerId(String vmManagerId) {
this.vmManagerId = vmManagerId;
}
/**
*
* The ID of the VM manager.
*
*
* @return The ID of the VM manager.
*/
public String getVmManagerId() {
return this.vmManagerId;
}
/**
*
* The ID of the VM manager.
*
*
* @param vmManagerId
* The ID of the VM manager.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withVmManagerId(String vmManagerId) {
setVmManagerId(vmManagerId);
return this;
}
/**
*
* The IP address of the connector.
*
*
* @param ipAddress
* The IP address of the connector.
*/
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
/**
*
* The IP address of the connector.
*
*
* @return The IP address of the connector.
*/
public String getIpAddress() {
return this.ipAddress;
}
/**
*
* The IP address of the connector.
*
*
* @param ipAddress
* The IP address of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withIpAddress(String ipAddress) {
setIpAddress(ipAddress);
return this;
}
/**
*
* The MAC address of the connector.
*
*
* @param macAddress
* The MAC address of the connector.
*/
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}
/**
*
* The MAC address of the connector.
*
*
* @return The MAC address of the connector.
*/
public String getMacAddress() {
return this.macAddress;
}
/**
*
* The MAC address of the connector.
*
*
* @param macAddress
* The MAC address of the connector.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withMacAddress(String macAddress) {
setMacAddress(macAddress);
return this;
}
/**
*
* The time the connector was associated.
*
*
* @param associatedOn
* The time the connector was associated.
*/
public void setAssociatedOn(java.util.Date associatedOn) {
this.associatedOn = associatedOn;
}
/**
*
* The time the connector was associated.
*
*
* @return The time the connector was associated.
*/
public java.util.Date getAssociatedOn() {
return this.associatedOn;
}
/**
*
* The time the connector was associated.
*
*
* @param associatedOn
* The time the connector was associated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Connector withAssociatedOn(java.util.Date associatedOn) {
setAssociatedOn(associatedOn);
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 (getConnectorId() != null)
sb.append("ConnectorId: ").append(getConnectorId()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCapabilityList() != null)
sb.append("CapabilityList: ").append(getCapabilityList()).append(",");
if (getVmManagerName() != null)
sb.append("VmManagerName: ").append(getVmManagerName()).append(",");
if (getVmManagerType() != null)
sb.append("VmManagerType: ").append(getVmManagerType()).append(",");
if (getVmManagerId() != null)
sb.append("VmManagerId: ").append(getVmManagerId()).append(",");
if (getIpAddress() != null)
sb.append("IpAddress: ").append(getIpAddress()).append(",");
if (getMacAddress() != null)
sb.append("MacAddress: ").append(getMacAddress()).append(",");
if (getAssociatedOn() != null)
sb.append("AssociatedOn: ").append(getAssociatedOn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Connector == false)
return false;
Connector other = (Connector) obj;
if (other.getConnectorId() == null ^ this.getConnectorId() == null)
return false;
if (other.getConnectorId() != null && other.getConnectorId().equals(this.getConnectorId()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == 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.getCapabilityList() == null ^ this.getCapabilityList() == null)
return false;
if (other.getCapabilityList() != null && other.getCapabilityList().equals(this.getCapabilityList()) == false)
return false;
if (other.getVmManagerName() == null ^ this.getVmManagerName() == null)
return false;
if (other.getVmManagerName() != null && other.getVmManagerName().equals(this.getVmManagerName()) == false)
return false;
if (other.getVmManagerType() == null ^ this.getVmManagerType() == null)
return false;
if (other.getVmManagerType() != null && other.getVmManagerType().equals(this.getVmManagerType()) == false)
return false;
if (other.getVmManagerId() == null ^ this.getVmManagerId() == null)
return false;
if (other.getVmManagerId() != null && other.getVmManagerId().equals(this.getVmManagerId()) == false)
return false;
if (other.getIpAddress() == null ^ this.getIpAddress() == null)
return false;
if (other.getIpAddress() != null && other.getIpAddress().equals(this.getIpAddress()) == false)
return false;
if (other.getMacAddress() == null ^ this.getMacAddress() == null)
return false;
if (other.getMacAddress() != null && other.getMacAddress().equals(this.getMacAddress()) == false)
return false;
if (other.getAssociatedOn() == null ^ this.getAssociatedOn() == null)
return false;
if (other.getAssociatedOn() != null && other.getAssociatedOn().equals(this.getAssociatedOn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getConnectorId() == null) ? 0 : getConnectorId().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCapabilityList() == null) ? 0 : getCapabilityList().hashCode());
hashCode = prime * hashCode + ((getVmManagerName() == null) ? 0 : getVmManagerName().hashCode());
hashCode = prime * hashCode + ((getVmManagerType() == null) ? 0 : getVmManagerType().hashCode());
hashCode = prime * hashCode + ((getVmManagerId() == null) ? 0 : getVmManagerId().hashCode());
hashCode = prime * hashCode + ((getIpAddress() == null) ? 0 : getIpAddress().hashCode());
hashCode = prime * hashCode + ((getMacAddress() == null) ? 0 : getMacAddress().hashCode());
hashCode = prime * hashCode + ((getAssociatedOn() == null) ? 0 : getAssociatedOn().hashCode());
return hashCode;
}
@Override
public Connector clone() {
try {
return (Connector) 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.servermigration.model.transform.ConnectorMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}