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;
 

Describes Challenge-Handshake Authentication Protocol (CHAP) information that supports authentication between your gateway and iSCSI initiators.

 
 public class ChapInfo implements SerializableCloneable {

    
The Amazon Resource Name (ARN) of the volume.

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

Constraints:
Length: 50 - 800

 
     private String targetARN;

    
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.

Constraints:
Length: 1 - 100

 
     private String secretToAuthenticateInitiator;

    
The iSCSI initiator that connects to the target.

Constraints:
Length: 1 - 255
Pattern: [0-9a-z:.-]+

 
     private String initiatorName;

    
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

Constraints:
Length: 1 - 100

 
     private String secretToAuthenticateTarget;

    
The Amazon Resource Name (ARN) of the volume.

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

Constraints:
Length: 50 - 800

Returns:
The Amazon Resource Name (ARN) of the volume.

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

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

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

Constraints:
Length: 50 - 800

Parameters:
targetARN The Amazon Resource Name (ARN) of the volume.

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

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

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

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.

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

Returns:
A reference to this updated object so that method calls can be chained together.
    public ChapInfo withTargetARN(String targetARN) {
        this. = targetARN;
        return this;
    }

    
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.

Constraints:
Length: 1 - 100

Returns:
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
        return ;
    }
    
    
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.

Constraints:
Length: 1 - 100

Parameters:
secretToAuthenticateInitiator The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
    public void setSecretToAuthenticateInitiator(String secretToAuthenticateInitiator) {
        this. = secretToAuthenticateInitiator;
    }
    
    
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.

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

Constraints:
Length: 1 - 100

Parameters:
secretToAuthenticateInitiator The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChapInfo withSecretToAuthenticateInitiator(String secretToAuthenticateInitiator) {
        this. = secretToAuthenticateInitiator;
        return this;
    }

    
The iSCSI initiator that connects to the target.

Constraints:
Length: 1 - 255
Pattern: [0-9a-z:.-]+

Returns:
The iSCSI initiator that connects to the target.
    public String getInitiatorName() {
        return ;
    }
    
    
The iSCSI initiator that connects to the target.

Constraints:
Length: 1 - 255
Pattern: [0-9a-z:.-]+

Parameters:
initiatorName The iSCSI initiator that connects to the target.
    public void setInitiatorName(String initiatorName) {
        this. = initiatorName;
    }
    
    
The iSCSI initiator that connects to the target.

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

Constraints:
Length: 1 - 255
Pattern: [0-9a-z:.-]+

Parameters:
initiatorName The iSCSI initiator that connects to the target.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChapInfo withInitiatorName(String initiatorName) {
        this. = initiatorName;
        return this;
    }

    
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

Constraints:
Length: 1 - 100

Returns:
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).
        return ;
    }
    
    
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

Constraints:
Length: 1 - 100

Parameters:
secretToAuthenticateTarget The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).
    public void setSecretToAuthenticateTarget(String secretToAuthenticateTarget) {
        this. = secretToAuthenticateTarget;
    }
    
    
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

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

Constraints:
Length: 1 - 100

Parameters:
secretToAuthenticateTarget The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChapInfo withSecretToAuthenticateTarget(String secretToAuthenticateTarget) {
        this. = secretToAuthenticateTarget;
        return this;
    }

    
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 (getSecretToAuthenticateInitiator() != nullsb.append("SecretToAuthenticateInitiator: " + getSecretToAuthenticateInitiator() + ",");
        if (getInitiatorName() != nullsb.append("InitiatorName: " + getInitiatorName() + ",");
        if (getSecretToAuthenticateTarget() != nullsb.append("SecretToAuthenticateTarget: " + getSecretToAuthenticateTarget() );
        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 + ((getSecretToAuthenticateInitiator() == null) ? 0 : getSecretToAuthenticateInitiator().hashCode()); 
        hashCode = prime * hashCode + ((getInitiatorName() == null) ? 0 : getInitiatorName().hashCode()); 
        hashCode = prime * hashCode + ((getSecretToAuthenticateTarget() == null) ? 0 : getSecretToAuthenticateTarget().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ChapInfo == falsereturn false;
        ChapInfo other = (ChapInfo)obj;
        
        if (other.getTargetARN() == null ^ this.getTargetARN() == nullreturn false;
        if (other.getTargetARN() != null && other.getTargetARN().equals(this.getTargetARN()) == falsereturn false
        if (other.getSecretToAuthenticateInitiator() == null ^ this.getSecretToAuthenticateInitiator() == nullreturn false;
        if (other.getSecretToAuthenticateInitiator() != null && other.getSecretToAuthenticateInitiator().equals(this.getSecretToAuthenticateInitiator()) == falsereturn false
        if (other.getInitiatorName() == null ^ this.getInitiatorName() == nullreturn false;
        if (other.getInitiatorName() != null && other.getInitiatorName().equals(this.getInitiatorName()) == falsereturn false
        if (other.getSecretToAuthenticateTarget() == null ^ this.getSecretToAuthenticateTarget() == nullreturn false;
        if (other.getSecretToAuthenticateTarget() != null && other.getSecretToAuthenticateTarget().equals(this.getSecretToAuthenticateTarget()) == falsereturn false
        return true;
    }
    
    @Override
    public ChapInfo clone() {
        try {
            return (ChapInfosuper.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