com.amazonaws.services.storagegateway.model.VolumeiSCSIAttributes Maven / Gradle / Ivy
Show all versions of aws-java-sdk-storagegateway 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.storagegateway.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Lists iSCSI information about a volume.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VolumeiSCSIAttributes implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the volume target.
*
*/
private String targetARN;
/**
*
* The network interface identifier.
*
*/
private String networkInterfaceId;
/**
*
* The port used to communicate with iSCSI targets.
*
*/
private Integer networkInterfacePort;
/**
*
* The logical disk number.
*
*/
private Integer lunNumber;
/**
*
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*
*/
private Boolean chapEnabled;
/**
*
* The Amazon Resource Name (ARN) of the volume target.
*
*
* @param targetARN
* The Amazon Resource Name (ARN) of the volume target.
*/
public void setTargetARN(String targetARN) {
this.targetARN = targetARN;
}
/**
*
* The Amazon Resource Name (ARN) of the volume target.
*
*
* @return The Amazon Resource Name (ARN) of the volume target.
*/
public String getTargetARN() {
return this.targetARN;
}
/**
*
* The Amazon Resource Name (ARN) of the volume target.
*
*
* @param targetARN
* The Amazon Resource Name (ARN) of the volume target.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeiSCSIAttributes withTargetARN(String targetARN) {
setTargetARN(targetARN);
return this;
}
/**
*
* The network interface identifier.
*
*
* @param networkInterfaceId
* The network interface identifier.
*/
public void setNetworkInterfaceId(String networkInterfaceId) {
this.networkInterfaceId = networkInterfaceId;
}
/**
*
* The network interface identifier.
*
*
* @return The network interface identifier.
*/
public String getNetworkInterfaceId() {
return this.networkInterfaceId;
}
/**
*
* The network interface identifier.
*
*
* @param networkInterfaceId
* The network interface identifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeiSCSIAttributes withNetworkInterfaceId(String networkInterfaceId) {
setNetworkInterfaceId(networkInterfaceId);
return this;
}
/**
*
* The port used to communicate with iSCSI targets.
*
*
* @param networkInterfacePort
* The port used to communicate with iSCSI targets.
*/
public void setNetworkInterfacePort(Integer networkInterfacePort) {
this.networkInterfacePort = networkInterfacePort;
}
/**
*
* The port used to communicate with iSCSI targets.
*
*
* @return The port used to communicate with iSCSI targets.
*/
public Integer getNetworkInterfacePort() {
return this.networkInterfacePort;
}
/**
*
* The port used to communicate with iSCSI targets.
*
*
* @param networkInterfacePort
* The port used to communicate with iSCSI targets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeiSCSIAttributes withNetworkInterfacePort(Integer networkInterfacePort) {
setNetworkInterfacePort(networkInterfacePort);
return this;
}
/**
*
* The logical disk number.
*
*
* @param lunNumber
* The logical disk number.
*/
public void setLunNumber(Integer lunNumber) {
this.lunNumber = lunNumber;
}
/**
*
* The logical disk number.
*
*
* @return The logical disk number.
*/
public Integer getLunNumber() {
return this.lunNumber;
}
/**
*
* The logical disk number.
*
*
* @param lunNumber
* The logical disk number.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeiSCSIAttributes withLunNumber(Integer lunNumber) {
setLunNumber(lunNumber);
return this;
}
/**
*
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*
*
* @param chapEnabled
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*/
public void setChapEnabled(Boolean chapEnabled) {
this.chapEnabled = chapEnabled;
}
/**
*
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*
*
* @return Indicates whether mutual CHAP is enabled for the iSCSI target.
*/
public Boolean getChapEnabled() {
return this.chapEnabled;
}
/**
*
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*
*
* @param chapEnabled
* Indicates whether mutual CHAP is enabled for the iSCSI target.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeiSCSIAttributes withChapEnabled(Boolean chapEnabled) {
setChapEnabled(chapEnabled);
return this;
}
/**
*
* Indicates whether mutual CHAP is enabled for the iSCSI target.
*
*
* @return Indicates whether mutual CHAP is enabled for the iSCSI target.
*/
public Boolean isChapEnabled() {
return this.chapEnabled;
}
/**
* 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 (getTargetARN() != null)
sb.append("TargetARN: ").append(getTargetARN()).append(",");
if (getNetworkInterfaceId() != null)
sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(",");
if (getNetworkInterfacePort() != null)
sb.append("NetworkInterfacePort: ").append(getNetworkInterfacePort()).append(",");
if (getLunNumber() != null)
sb.append("LunNumber: ").append(getLunNumber()).append(",");
if (getChapEnabled() != null)
sb.append("ChapEnabled: ").append(getChapEnabled());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VolumeiSCSIAttributes == false)
return false;
VolumeiSCSIAttributes other = (VolumeiSCSIAttributes) obj;
if (other.getTargetARN() == null ^ this.getTargetARN() == null)
return false;
if (other.getTargetARN() != null && other.getTargetARN().equals(this.getTargetARN()) == false)
return false;
if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == null)
return false;
if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == false)
return false;
if (other.getNetworkInterfacePort() == null ^ this.getNetworkInterfacePort() == null)
return false;
if (other.getNetworkInterfacePort() != null && other.getNetworkInterfacePort().equals(this.getNetworkInterfacePort()) == false)
return false;
if (other.getLunNumber() == null ^ this.getLunNumber() == null)
return false;
if (other.getLunNumber() != null && other.getLunNumber().equals(this.getLunNumber()) == false)
return false;
if (other.getChapEnabled() == null ^ this.getChapEnabled() == null)
return false;
if (other.getChapEnabled() != null && other.getChapEnabled().equals(this.getChapEnabled()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTargetARN() == null) ? 0 : getTargetARN().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfacePort() == null) ? 0 : getNetworkInterfacePort().hashCode());
hashCode = prime * hashCode + ((getLunNumber() == null) ? 0 : getLunNumber().hashCode());
hashCode = prime * hashCode + ((getChapEnabled() == null) ? 0 : getChapEnabled().hashCode());
return hashCode;
}
@Override
public VolumeiSCSIAttributes clone() {
try {
return (VolumeiSCSIAttributes) 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.storagegateway.model.transform.VolumeiSCSIAttributesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}