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;
 
 
Container for the parameters to the ModifyHsm operation.

Modifies an HSM.

 
 public class ModifyHsmRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ARN of the HSM to modify.

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

 
     private String hsmArn;

    
The new identifier of the subnet that the HSM is in.

Constraints:
Pattern: subnet-[0-9a-f]{8}

 
     private String subnetId;

    
The new IP address for the elastic network interface attached to the HSM.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

 
     private String eniIp;

    
The new IAM role ARN.

Constraints:
Pattern: arn:aws(-iso)?:iam::[0-9]{12}:role/[a-zA-Z0-9_\+=,\.\-@]{1,64}

 
     private String iamRoleArn;

    
The new external ID.

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

 
     private String externalId;

    
The new IP address for the syslog monitoring server.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

 
     private String syslogIp;

    
The ARN of the HSM to modify.

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

Returns:
The ARN of the HSM to modify.
 
     public String getHsmArn() {
         return ;
     }
    
    
The ARN of the HSM to modify.

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

Parameters:
hsmArn The ARN of the HSM to modify.
 
    public void setHsmArn(String hsmArn) {
        this. = hsmArn;
    }
    
    
The ARN of the HSM to modify.

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}:hsm-[0-9a-f]{8}

Parameters:
hsmArn The ARN of the HSM to modify.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withHsmArn(String hsmArn) {
        this. = hsmArn;
        return this;
    }

    
The new identifier of the subnet that the HSM is in.

Constraints:
Pattern: subnet-[0-9a-f]{8}

Returns:
The new identifier of the subnet that the HSM is in.
    public String getSubnetId() {
        return ;
    }
    
    
The new identifier of the subnet that the HSM is in.

Constraints:
Pattern: subnet-[0-9a-f]{8}

Parameters:
subnetId The new identifier of the subnet that the HSM is in.
    public void setSubnetId(String subnetId) {
        this. = subnetId;
    }
    
    
The new identifier of the subnet that the HSM is in.

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

Constraints:
Pattern: subnet-[0-9a-f]{8}

Parameters:
subnetId The new identifier of the subnet that the HSM is in.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withSubnetId(String subnetId) {
        this. = subnetId;
        return this;
    }

    
The new IP address for the elastic network interface attached to the HSM.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Returns:
The new IP address for the elastic network interface attached to the HSM.
    public String getEniIp() {
        return ;
    }
    
    
The new IP address for the elastic network interface attached to the HSM.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Parameters:
eniIp The new IP address for the elastic network interface attached to the HSM.
    public void setEniIp(String eniIp) {
        this. = eniIp;
    }
    
    
The new IP address for the elastic network interface attached to the HSM.

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

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Parameters:
eniIp The new IP address for the elastic network interface attached to the HSM.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withEniIp(String eniIp) {
        this. = eniIp;
        return this;
    }

    
The new IAM role ARN.

Constraints:
Pattern: arn:aws(-iso)?:iam::[0-9]{12}:role/[a-zA-Z0-9_\+=,\.\-@]{1,64}

Returns:
The new IAM role ARN.
    public String getIamRoleArn() {
        return ;
    }
    
    
The new IAM role ARN.

Constraints:
Pattern: arn:aws(-iso)?:iam::[0-9]{12}:role/[a-zA-Z0-9_\+=,\.\-@]{1,64}

Parameters:
iamRoleArn The new IAM role ARN.
    public void setIamRoleArn(String iamRoleArn) {
        this. = iamRoleArn;
    }
    
    
The new IAM role ARN.

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

Constraints:
Pattern: arn:aws(-iso)?:iam::[0-9]{12}:role/[a-zA-Z0-9_\+=,\.\-@]{1,64}

Parameters:
iamRoleArn The new IAM role ARN.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withIamRoleArn(String iamRoleArn) {
        this. = iamRoleArn;
        return this;
    }

    
The new external ID.

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

Returns:
The new external ID.
    public String getExternalId() {
        return ;
    }
    
    
The new external ID.

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

Parameters:
externalId The new external ID.
    public void setExternalId(String externalId) {
        this. = externalId;
    }
    
    
The new external ID.

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

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

Parameters:
externalId The new external ID.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withExternalId(String externalId) {
        this. = externalId;
        return this;
    }

    
The new IP address for the syslog monitoring server.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Returns:
The new IP address for the syslog monitoring server.
    public String getSyslogIp() {
        return ;
    }
    
    
The new IP address for the syslog monitoring server.

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Parameters:
syslogIp The new IP address for the syslog monitoring server.
    public void setSyslogIp(String syslogIp) {
        this. = syslogIp;
    }
    
    
The new IP address for the syslog monitoring server.

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

Constraints:
Pattern: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

Parameters:
syslogIp The new IP address for the syslog monitoring server.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyHsmRequest withSyslogIp(String syslogIp) {
        this. = syslogIp;
        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 (getHsmArn() != nullsb.append("HsmArn: " + getHsmArn() + ",");
        if (getSubnetId() != nullsb.append("SubnetId: " + getSubnetId() + ",");
        if (getEniIp() != nullsb.append("EniIp: " + getEniIp() + ",");
        if (getIamRoleArn() != nullsb.append("IamRoleArn: " + getIamRoleArn() + ",");
        if (getExternalId() != nullsb.append("ExternalId: " + getExternalId() + ",");
        if (getSyslogIp() != nullsb.append("SyslogIp: " + getSyslogIp() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getHsmArn() == null) ? 0 : getHsmArn().hashCode()); 
        hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getEniIp() == null) ? 0 : getEniIp().hashCode()); 
        hashCode = prime * hashCode + ((getIamRoleArn() == null) ? 0 : getIamRoleArn().hashCode()); 
        hashCode = prime * hashCode + ((getExternalId() == null) ? 0 : getExternalId().hashCode()); 
        hashCode = prime * hashCode + ((getSyslogIp() == null) ? 0 : getSyslogIp().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ModifyHsmRequest == falsereturn false;
        ModifyHsmRequest other = (ModifyHsmRequest)obj;
        
        if (other.getHsmArn() == null ^ this.getHsmArn() == nullreturn false;
        if (other.getHsmArn() != null && other.getHsmArn().equals(this.getHsmArn()) == falsereturn false
        if (other.getSubnetId() == null ^ this.getSubnetId() == nullreturn false;
        if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == falsereturn false
        if (other.getEniIp() == null ^ this.getEniIp() == nullreturn false;
        if (other.getEniIp() != null && other.getEniIp().equals(this.getEniIp()) == falsereturn false
        if (other.getIamRoleArn() == null ^ this.getIamRoleArn() == nullreturn false;
        if (other.getIamRoleArn() != null && other.getIamRoleArn().equals(this.getIamRoleArn()) == falsereturn false
        if (other.getExternalId() == null ^ this.getExternalId() == nullreturn false;
        if (other.getExternalId() != null && other.getExternalId().equals(this.getExternalId()) == falsereturn false
        if (other.getSyslogIp() == null ^ this.getSyslogIp() == nullreturn false;
        if (other.getSyslogIp() != null && other.getSyslogIp().equals(this.getSyslogIp()) == falsereturn false
        return true;
    }
    
    @Override
    public ModifyHsmRequest clone() {
        
            return (ModifyHsmRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X