Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

Lists iSCSI information about a volume.

 
 public class VolumeiSCSIAttributes implements SerializableCloneable {

    
The Amazon Resource Name (ARN) of the volume target.

Constraints:
Length: 50 - 800

 
     private String targetARN;

    
The network interface identifier.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

 
     private String networkInterfaceId;

    
The port used to communicate with iSCSI targets.
 
     private Integer networkInterfacePort;

    
The logical disk number.

Constraints:
Range: 1 -

 
     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.

Constraints:
Length: 50 - 800

Returns:
The Amazon Resource Name (ARN) of the volume target.
 
     public String getTargetARN() {
         return ;
     }
    
    
The Amazon Resource Name (ARN) of the volume target.

Constraints:
Length: 50 - 800

Parameters:
targetARN The Amazon Resource Name (ARN) of the volume target.
 
     public void setTargetARN(String targetARN) {
         this. = targetARN;
     }
    
    
The Amazon Resource Name (ARN) of the volume target.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 50 - 800

Parameters:
targetARN The Amazon Resource Name (ARN) of the volume target.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public VolumeiSCSIAttributes withTargetARN(String targetARN) {
         this. = targetARN;
         return this;
    }

    
The network interface identifier.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Returns:
The network interface identifier.
    public String getNetworkInterfaceId() {
        return ;
    }
    
    
The network interface identifier.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Parameters:
networkInterfaceId The network interface identifier.
    public void setNetworkInterfaceId(String networkInterfaceId) {
        this. = networkInterfaceId;
    }
    
    
The network interface identifier.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Parameters:
networkInterfaceId The network interface identifier.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeiSCSIAttributes withNetworkInterfaceId(String networkInterfaceId) {
        this. = networkInterfaceId;
        return this;
    }

    
The port used to communicate with iSCSI targets.

Returns:
The port used to communicate with iSCSI targets.
    public Integer getNetworkInterfacePort() {
        return ;
    }
    
    
The port used to communicate with iSCSI targets.

Parameters:
networkInterfacePort The port used to communicate with iSCSI targets.
    public void setNetworkInterfacePort(Integer networkInterfacePort) {
        this. = networkInterfacePort;
    }
    
    
The port used to communicate with iSCSI targets.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfacePort The port used to communicate with iSCSI targets.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeiSCSIAttributes withNetworkInterfacePort(Integer networkInterfacePort) {
        this. = networkInterfacePort;
        return this;
    }

    
The logical disk number.

Constraints:
Range: 1 -

Returns:
The logical disk number.
    public Integer getLunNumber() {
        return ;
    }
    
    
The logical disk number.

Constraints:
Range: 1 -

Parameters:
lunNumber The logical disk number.
    public void setLunNumber(Integer lunNumber) {
        this. = lunNumber;
    }
    
    
The logical disk number.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 -

Parameters:
lunNumber The logical disk number.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeiSCSIAttributes withLunNumber(Integer lunNumber) {
        this. = lunNumber;
        return this;
    }

    
Indicates whether mutual CHAP is enabled for the iSCSI target.

Returns:
Indicates whether mutual CHAP is enabled for the iSCSI target.
    public Boolean isChapEnabled() {
        return ;
    }
    
    
Indicates whether mutual CHAP is enabled for the iSCSI target.

Parameters:
chapEnabled Indicates whether mutual CHAP is enabled for the iSCSI target.
    public void setChapEnabled(Boolean chapEnabled) {
        this. = chapEnabled;
    }
    
    
Indicates whether mutual CHAP is enabled for the iSCSI target.

Returns a reference to this object so that method calls can be chained together.

Parameters:
chapEnabled Indicates whether mutual CHAP is enabled for the iSCSI target.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeiSCSIAttributes withChapEnabled(Boolean chapEnabled) {
        this. = chapEnabled;
        return this;
    }

    
Indicates whether mutual CHAP is enabled for the iSCSI target.

Returns:
Indicates whether mutual CHAP is enabled for the iSCSI target.
    public Boolean getChapEnabled() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTargetARN() != nullsb.append("TargetARN: " + getTargetARN() + ",");
        if (getNetworkInterfaceId() != nullsb.append("NetworkInterfaceId: " + getNetworkInterfaceId() + ",");
        if (getNetworkInterfacePort() != nullsb.append("NetworkInterfacePort: " + getNetworkInterfacePort() + ",");
        if (getLunNumber() != nullsb.append("LunNumber: " + getLunNumber() + ",");
        if (isChapEnabled() != nullsb.append("ChapEnabled: " + isChapEnabled() );
        sb.append("}");
        return sb.toString();
    }
    
    @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 + ((isChapEnabled() == null) ? 0 : isChapEnabled().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VolumeiSCSIAttributes == falsereturn false;
        VolumeiSCSIAttributes other = (VolumeiSCSIAttributes)obj;
        
        if (other.getTargetARN() == null ^ this.getTargetARN() == nullreturn false;
        if (other.getTargetARN() != null && other.getTargetARN().equals(this.getTargetARN()) == falsereturn false
        if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == nullreturn false;
        if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == falsereturn false
        if (other.getNetworkInterfacePort() == null ^ this.getNetworkInterfacePort() == nullreturn false;
        if (other.getNetworkInterfacePort() != null && other.getNetworkInterfacePort().equals(this.getNetworkInterfacePort()) == falsereturn false
        if (other.getLunNumber() == null ^ this.getLunNumber() == nullreturn false;
        if (other.getLunNumber() != null && other.getLunNumber().equals(this.getLunNumber()) == falsereturn false
        if (other.isChapEnabled() == null ^ this.isChapEnabled() == nullreturn false;
        if (other.isChapEnabled() != null && other.isChapEnabled().equals(this.isChapEnabled()) == falsereturn false
        return true;
    }
    
    @Override
    public VolumeiSCSIAttributes clone() {
        try {
            return (VolumeiSCSIAttributessuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X