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.cloudhsm.model;
 

Contains the output of the DescribeHapg action.

 
 public class DescribeHapgResult implements SerializableCloneable {

    
The ARN of the high-availability partition group.

Constraints:
Pattern: arn:aws(-iso)?:cloudhsm:[a-zA-Z0-9\-]*:[0-9]{12}:hapg-[0-9a-f]{8}

 
     private String hapgArn;

    
The serial number of the high-availability partition group.

Constraints:
Pattern: [\w :+=./\\-]*

 
     private String hapgSerial;

    
Contains a list of ARNs that identify the HSMs.
 
Contains a list of ARNs that identify the HSMs.
 
Contains a list of ARNs that identify the HSMs.
 
The label for the high-availability partition group.

Constraints:
Pattern: [a-zA-Z0-9_.-]{1,64}

 
     private String label;

    
The date and time the high-availability partition group was last modified.

Constraints:
Pattern: \d*

 
     private String lastModifiedTimestamp;

    
The list of partition serial numbers that belong to the high-availability partition group.
 
The state of the high-availability partition group.

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

 
     private String state;

    
The ARN of the high-availability partition group.

Constraints:
Pattern: arn:aws(-iso)?:cloudhsm:[a-zA-Z0-9\-]*:[0-9]{12}:hapg-[0-9a-f]{8}

Returns:
The ARN of the high-availability partition group.
 
     public String getHapgArn() {
         return ;
     }
    
    
The ARN of the high-availability partition group.

Constraints:
Pattern: arn:aws(-iso)?:cloudhsm:[a-zA-Z0-9\-]*:[0-9]{12}:hapg-[0-9a-f]{8}

Parameters:
hapgArn The ARN of the high-availability partition group.
    public void setHapgArn(String hapgArn) {
        this. = hapgArn;
    }
    
    
The ARN of the high-availability partition group.

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

Constraints:
Pattern: arn:aws(-iso)?:cloudhsm:[a-zA-Z0-9\-]*:[0-9]{12}:hapg-[0-9a-f]{8}

Parameters:
hapgArn The ARN of the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHapgArn(String hapgArn) {
        this. = hapgArn;
        return this;
    }

    
The serial number of the high-availability partition group.

Constraints:
Pattern: [\w :+=./\\-]*

Returns:
The serial number of the high-availability partition group.
    public String getHapgSerial() {
        return ;
    }
    
    
The serial number of the high-availability partition group.

Constraints:
Pattern: [\w :+=./\\-]*

Parameters:
hapgSerial The serial number of the high-availability partition group.
    public void setHapgSerial(String hapgSerial) {
        this. = hapgSerial;
    }
    
    
The serial number of the high-availability partition group.

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

Constraints:
Pattern: [\w :+=./\\-]*

Parameters:
hapgSerial The serial number of the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHapgSerial(String hapgSerial) {
        this. = hapgSerial;
        return this;
    }

    
Contains a list of ARNs that identify the HSMs.

Returns:
Contains a list of ARNs that identify the HSMs.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Contains a list of ARNs that identify the HSMs.

Parameters:
hsmsLastActionFailed Contains a list of ARNs that identify the HSMs.
    public void setHsmsLastActionFailed(java.util.Collection<StringhsmsLastActionFailed) {
        if (hsmsLastActionFailed == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsLastActionFailedCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsLastActionFailed.size());
        hsmsLastActionFailedCopy.addAll(hsmsLastActionFailed);
        this. = hsmsLastActionFailedCopy;
    }
    
    
Contains a list of ARNs that identify the HSMs.

NOTE: This method appends the values to the existing list (if any). Use setHsmsLastActionFailed(java.util.Collection) or withHsmsLastActionFailed(java.util.Collection) if you want to override the existing values.

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

Parameters:
hsmsLastActionFailed Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsLastActionFailed(String... hsmsLastActionFailed) {
        if (getHsmsLastActionFailed() == nullsetHsmsLastActionFailed(new java.util.ArrayList<String>(hsmsLastActionFailed.length));
        for (String value : hsmsLastActionFailed) {
            getHsmsLastActionFailed().add(value);
        }
        return this;
    }
    
    
Contains a list of ARNs that identify the HSMs.

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

Parameters:
hsmsLastActionFailed Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsLastActionFailed(java.util.Collection<StringhsmsLastActionFailed) {
        if (hsmsLastActionFailed == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsLastActionFailedCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsLastActionFailed.size());
            hsmsLastActionFailedCopy.addAll(hsmsLastActionFailed);
            this. = hsmsLastActionFailedCopy;
        }
        return this;
    }

    
Contains a list of ARNs that identify the HSMs.

Returns:
Contains a list of ARNs that identify the HSMs.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Contains a list of ARNs that identify the HSMs.

Parameters:
hsmsPendingDeletion Contains a list of ARNs that identify the HSMs.
    public void setHsmsPendingDeletion(java.util.Collection<StringhsmsPendingDeletion) {
        if (hsmsPendingDeletion == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsPendingDeletionCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsPendingDeletion.size());
        hsmsPendingDeletionCopy.addAll(hsmsPendingDeletion);
        this. = hsmsPendingDeletionCopy;
    }
    
    
Contains a list of ARNs that identify the HSMs.

NOTE: This method appends the values to the existing list (if any). Use setHsmsPendingDeletion(java.util.Collection) or withHsmsPendingDeletion(java.util.Collection) if you want to override the existing values.

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

Parameters:
hsmsPendingDeletion Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsPendingDeletion(String... hsmsPendingDeletion) {
        if (getHsmsPendingDeletion() == nullsetHsmsPendingDeletion(new java.util.ArrayList<String>(hsmsPendingDeletion.length));
        for (String value : hsmsPendingDeletion) {
            getHsmsPendingDeletion().add(value);
        }
        return this;
    }
    
    
Contains a list of ARNs that identify the HSMs.

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

Parameters:
hsmsPendingDeletion Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsPendingDeletion(java.util.Collection<StringhsmsPendingDeletion) {
        if (hsmsPendingDeletion == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsPendingDeletionCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsPendingDeletion.size());
            hsmsPendingDeletionCopy.addAll(hsmsPendingDeletion);
            this. = hsmsPendingDeletionCopy;
        }
        return this;
    }

    
Contains a list of ARNs that identify the HSMs.

Returns:
Contains a list of ARNs that identify the HSMs.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Contains a list of ARNs that identify the HSMs.

Parameters:
hsmsPendingRegistration Contains a list of ARNs that identify the HSMs.
    public void setHsmsPendingRegistration(java.util.Collection<StringhsmsPendingRegistration) {
        if (hsmsPendingRegistration == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsPendingRegistrationCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsPendingRegistration.size());
        hsmsPendingRegistrationCopy.addAll(hsmsPendingRegistration);
        this. = hsmsPendingRegistrationCopy;
    }
    
    
Contains a list of ARNs that identify the HSMs.

NOTE: This method appends the values to the existing list (if any). Use setHsmsPendingRegistration(java.util.Collection) or withHsmsPendingRegistration(java.util.Collection) if you want to override the existing values.

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

Parameters:
hsmsPendingRegistration Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsPendingRegistration(String... hsmsPendingRegistration) {
        if (getHsmsPendingRegistration() == nullsetHsmsPendingRegistration(new java.util.ArrayList<String>(hsmsPendingRegistration.length));
        for (String value : hsmsPendingRegistration) {
            getHsmsPendingRegistration().add(value);
        }
        return this;
    }
    
    
Contains a list of ARNs that identify the HSMs.

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

Parameters:
hsmsPendingRegistration Contains a list of ARNs that identify the HSMs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withHsmsPendingRegistration(java.util.Collection<StringhsmsPendingRegistration) {
        if (hsmsPendingRegistration == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringhsmsPendingRegistrationCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(hsmsPendingRegistration.size());
            hsmsPendingRegistrationCopy.addAll(hsmsPendingRegistration);
            this. = hsmsPendingRegistrationCopy;
        }
        return this;
    }

    
The label for the high-availability partition group.

Constraints:
Pattern: [a-zA-Z0-9_.-]{1,64}

Returns:
The label for the high-availability partition group.
    public String getLabel() {
        return ;
    }
    
    
The label for the high-availability partition group.

Constraints:
Pattern: [a-zA-Z0-9_.-]{1,64}

Parameters:
label The label for the high-availability partition group.
    public void setLabel(String label) {
        this. = label;
    }
    
    
The label for the high-availability partition group.

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

Constraints:
Pattern: [a-zA-Z0-9_.-]{1,64}

Parameters:
label The label for the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withLabel(String label) {
        this. = label;
        return this;
    }

    
The date and time the high-availability partition group was last modified.

Constraints:
Pattern: \d*

Returns:
The date and time the high-availability partition group was last modified.
    public String getLastModifiedTimestamp() {
        return ;
    }
    
    
The date and time the high-availability partition group was last modified.

Constraints:
Pattern: \d*

Parameters:
lastModifiedTimestamp The date and time the high-availability partition group was last modified.
    public void setLastModifiedTimestamp(String lastModifiedTimestamp) {
        this. = lastModifiedTimestamp;
    }
    
    
The date and time the high-availability partition group was last modified.

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

Constraints:
Pattern: \d*

Parameters:
lastModifiedTimestamp The date and time the high-availability partition group was last modified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withLastModifiedTimestamp(String lastModifiedTimestamp) {
        this. = lastModifiedTimestamp;
        return this;
    }

    
The list of partition serial numbers that belong to the high-availability partition group.

Returns:
The list of partition serial numbers that belong to the high-availability partition group.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The list of partition serial numbers that belong to the high-availability partition group.

Parameters:
partitionSerialList The list of partition serial numbers that belong to the high-availability partition group.
    public void setPartitionSerialList(java.util.Collection<StringpartitionSerialList) {
        if (partitionSerialList == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringpartitionSerialListCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(partitionSerialList.size());
        partitionSerialListCopy.addAll(partitionSerialList);
        this. = partitionSerialListCopy;
    }
    
    
The list of partition serial numbers that belong to the high-availability partition group.

NOTE: This method appends the values to the existing list (if any). Use setPartitionSerialList(java.util.Collection) or withPartitionSerialList(java.util.Collection) if you want to override the existing values.

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

Parameters:
partitionSerialList The list of partition serial numbers that belong to the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withPartitionSerialList(String... partitionSerialList) {
        if (getPartitionSerialList() == nullsetPartitionSerialList(new java.util.ArrayList<String>(partitionSerialList.length));
        for (String value : partitionSerialList) {
            getPartitionSerialList().add(value);
        }
        return this;
    }
    
    
The list of partition serial numbers that belong to the high-availability partition group.

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

Parameters:
partitionSerialList The list of partition serial numbers that belong to the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeHapgResult withPartitionSerialList(java.util.Collection<StringpartitionSerialList) {
        if (partitionSerialList == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringpartitionSerialListCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(partitionSerialList.size());
            partitionSerialListCopy.addAll(partitionSerialList);
            this. = partitionSerialListCopy;
        }
        return this;
    }

    
The state of the high-availability partition group.

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

Returns:
The state of the high-availability partition group.
See also:
CloudHsmObjectState
    public String getState() {
        return ;
    }
    
    
The state of the high-availability partition group.

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

Parameters:
state The state of the high-availability partition group.
See also:
CloudHsmObjectState
    public void setState(String state) {
        this. = state;
    }
    
    
The state of the high-availability partition group.

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

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

Parameters:
state The state of the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
CloudHsmObjectState
    public DescribeHapgResult withState(String state) {
        this. = state;
        return this;
    }

    
The state of the high-availability partition group.

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

Parameters:
state The state of the high-availability partition group.
See also:
CloudHsmObjectState
    public void setState(CloudHsmObjectState state) {
        this. = state.toString();
    }
    
    
The state of the high-availability partition group.

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

Constraints:
Allowed Values: READY, UPDATING, DEGRADED

Parameters:
state The state of the high-availability partition group.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
CloudHsmObjectState
        this. = state.toString();
        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 (getHapgArn() != nullsb.append("HapgArn: " + getHapgArn() + ",");
        if (getHapgSerial() != nullsb.append("HapgSerial: " + getHapgSerial() + ",");
        if (getHsmsLastActionFailed() != nullsb.append("HsmsLastActionFailed: " + getHsmsLastActionFailed() + ",");
        if (getHsmsPendingDeletion() != nullsb.append("HsmsPendingDeletion: " + getHsmsPendingDeletion() + ",");
        if (getHsmsPendingRegistration() != nullsb.append("HsmsPendingRegistration: " + getHsmsPendingRegistration() + ",");
        if (getLabel() != nullsb.append("Label: " + getLabel() + ",");
        if (getLastModifiedTimestamp() != nullsb.append("LastModifiedTimestamp: " + getLastModifiedTimestamp() + ",");
        if (getPartitionSerialList() != nullsb.append("PartitionSerialList: " + getPartitionSerialList() + ",");
        if (getState() != nullsb.append("State: " + getState() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getHapgArn() == null) ? 0 : getHapgArn().hashCode()); 
        hashCode = prime * hashCode + ((getHapgSerial() == null) ? 0 : getHapgSerial().hashCode()); 
        hashCode = prime * hashCode + ((getHsmsLastActionFailed() == null) ? 0 : getHsmsLastActionFailed().hashCode()); 
        hashCode = prime * hashCode + ((getHsmsPendingDeletion() == null) ? 0 : getHsmsPendingDeletion().hashCode()); 
        hashCode = prime * hashCode + ((getHsmsPendingRegistration() == null) ? 0 : getHsmsPendingRegistration().hashCode()); 
        hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); 
        hashCode = prime * hashCode + ((getLastModifiedTimestamp() == null) ? 0 : getLastModifiedTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getPartitionSerialList() == null) ? 0 : getPartitionSerialList().hashCode()); 
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeHapgResult == falsereturn false;
        DescribeHapgResult other = (DescribeHapgResult)obj;
        
        if (other.getHapgArn() == null ^ this.getHapgArn() == nullreturn false;
        if (other.getHapgArn() != null && other.getHapgArn().equals(this.getHapgArn()) == falsereturn false
        if (other.getHapgSerial() == null ^ this.getHapgSerial() == nullreturn false;
        if (other.getHapgSerial() != null && other.getHapgSerial().equals(this.getHapgSerial()) == falsereturn false
        if (other.getHsmsLastActionFailed() == null ^ this.getHsmsLastActionFailed() == nullreturn false;
        if (other.getHsmsLastActionFailed() != null && other.getHsmsLastActionFailed().equals(this.getHsmsLastActionFailed()) == falsereturn false
        if (other.getHsmsPendingDeletion() == null ^ this.getHsmsPendingDeletion() == nullreturn false;
        if (other.getHsmsPendingDeletion() != null && other.getHsmsPendingDeletion().equals(this.getHsmsPendingDeletion()) == falsereturn false
        if (other.getHsmsPendingRegistration() == null ^ this.getHsmsPendingRegistration() == nullreturn false;
        if (other.getHsmsPendingRegistration() != null && other.getHsmsPendingRegistration().equals(this.getHsmsPendingRegistration()) == falsereturn false
        if (other.getLabel() == null ^ this.getLabel() == nullreturn false;
        if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == falsereturn false
        if (other.getLastModifiedTimestamp() == null ^ this.getLastModifiedTimestamp() == nullreturn false;
        if (other.getLastModifiedTimestamp() != null && other.getLastModifiedTimestamp().equals(this.getLastModifiedTimestamp()) == falsereturn false
        if (other.getPartitionSerialList() == null ^ this.getPartitionSerialList() == nullreturn false;
        if (other.getPartitionSerialList() != null && other.getPartitionSerialList().equals(this.getPartitionSerialList()) == falsereturn false
        if (other.getState() == null ^ this.getState() == nullreturn false;
        if (other.getState() != null && other.getState().equals(this.getState()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeHapgResult clone() {
        try {
            return (DescribeHapgResultsuper.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