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 CreateHsm operation.

Creates an uninitialized HSM instance. Running this command provisions an HSM appliance and will result in charges to your AWS account for the HSM.

 
 public class CreateHsmRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identifier of the subnet in your VPC in which to place the HSM.

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

 
     private String subnetId;

    
The SSH public key to install on the HSM.

Constraints:
Pattern: [a-zA-Z0-9+/= ._:\\@-]*

 
     private String sshKey;

    
The IP address to assign to the HSM's ENI.

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

 
     private String eniIp;

    
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.

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

 
     private String iamRoleArn;

    
The external ID from IamRoleArn, if present.

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

 
     private String externalId;

    
The subscription type.

Constraints:
Allowed Values: PRODUCTION

 
     private String subscriptionType;

    
A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.

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

 
     private String clientToken;

    
The 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 identifier of the subnet in your VPC in which to place the HSM.

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

Returns:
The identifier of the subnet in your VPC in which to place the HSM.
    public String getSubnetId() {
        return ;
    }
    
    
The identifier of the subnet in your VPC in which to place the HSM.

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

Parameters:
subnetId The identifier of the subnet in your VPC in which to place the HSM.
    public void setSubnetId(String subnetId) {
        this. = subnetId;
    }
    
    
The identifier of the subnet in your VPC in which to place the HSM.

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

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

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

    
The SSH public key to install on the HSM.

Constraints:
Pattern: [a-zA-Z0-9+/= ._:\\@-]*

Returns:
The SSH public key to install on the HSM.
    public String getSshKey() {
        return ;
    }
    
    
The SSH public key to install on the HSM.

Constraints:
Pattern: [a-zA-Z0-9+/= ._:\\@-]*

Parameters:
sshKey The SSH public key to install on the HSM.
    public void setSshKey(String sshKey) {
        this. = sshKey;
    }
    
    
The SSH public key to install on the HSM.

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

Constraints:
Pattern: [a-zA-Z0-9+/= ._:\\@-]*

Parameters:
sshKey The SSH public key to install on the HSM.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateHsmRequest withSshKey(String sshKey) {
        this. = sshKey;
        return this;
    }

    
The IP address to assign to the HSM's ENI.

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

Returns:
The IP address to assign to the HSM's ENI.
    public String getEniIp() {
        return ;
    }
    
    
The IP address to assign to the HSM's ENI.

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

Parameters:
eniIp The IP address to assign to the HSM's ENI.
    public void setEniIp(String eniIp) {
        this. = eniIp;
    }
    
    
The IP address to assign to the HSM's ENI.

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 IP address to assign to the HSM's ENI.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateHsmRequest withEniIp(String eniIp) {
        this. = eniIp;
        return this;
    }

    
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.

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

Returns:
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.
    public String getIamRoleArn() {
        return ;
    }
    
    
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.

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

Parameters:
iamRoleArn The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.
    public void setIamRoleArn(String iamRoleArn) {
        this. = iamRoleArn;
    }
    
    
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.

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 ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateHsmRequest withIamRoleArn(String iamRoleArn) {
        this. = iamRoleArn;
        return this;
    }

    
The external ID from IamRoleArn, if present.

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

Returns:
The external ID from IamRoleArn, if present.
    public String getExternalId() {
        return ;
    }
    
    
The external ID from IamRoleArn, if present.

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

Parameters:
externalId The external ID from IamRoleArn, if present.
    public void setExternalId(String externalId) {
        this. = externalId;
    }
    
    
The external ID from IamRoleArn, if present.

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

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

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

    
The subscription type.

Constraints:
Allowed Values: PRODUCTION

Returns:
The subscription type.
See also:
SubscriptionType
    public String getSubscriptionType() {
        return ;
    }
    
    
The subscription type.

Constraints:
Allowed Values: PRODUCTION

Parameters:
subscriptionType The subscription type.
See also:
SubscriptionType
    public void setSubscriptionType(String subscriptionType) {
        this. = subscriptionType;
    }
    
    
The subscription type.

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

Constraints:
Allowed Values: PRODUCTION

Parameters:
subscriptionType The subscription type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SubscriptionType
    public CreateHsmRequest withSubscriptionType(String subscriptionType) {
        this. = subscriptionType;
        return this;
    }

    
The subscription type.

Constraints:
Allowed Values: PRODUCTION

Parameters:
subscriptionType The subscription type.
See also:
SubscriptionType
    public void setSubscriptionType(SubscriptionType subscriptionType) {
        this. = subscriptionType.toString();
    }
    
    
The subscription type.

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

Constraints:
Allowed Values: PRODUCTION

Parameters:
subscriptionType The subscription type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SubscriptionType
    public CreateHsmRequest withSubscriptionType(SubscriptionType subscriptionType) {
        this. = subscriptionType.toString();
        return this;
    }

    
A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.

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

Returns:
A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.
    public String getClientToken() {
        return ;
    }
    
    
A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.

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

Parameters:
clientToken A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.
    public void setClientToken(String clientToken) {
        this. = clientToken;
    }
    
    
A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.

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

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

Parameters:
clientToken A user-defined token to ensure idempotence. Subsequent calls to this action with the same token will be ignored.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateHsmRequest withClientToken(String clientToken) {
        this. = clientToken;
        return this;
    }

    
The IP address for the syslog monitoring server.

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

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

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

Parameters:
syslogIp The IP address for the syslog monitoring server.
    public void setSyslogIp(String syslogIp) {
        this. = syslogIp;
    }
    
    
The 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 IP address for the syslog monitoring server.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateHsmRequest 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 (getSubnetId() != nullsb.append("SubnetId: " + getSubnetId() + ",");
        if (getSshKey() != nullsb.append("SshKey: " + getSshKey() + ",");
        if (getEniIp() != nullsb.append("EniIp: " + getEniIp() + ",");
        if (getIamRoleArn() != nullsb.append("IamRoleArn: " + getIamRoleArn() + ",");
        if (getExternalId() != nullsb.append("ExternalId: " + getExternalId() + ",");
        if (getSubscriptionType() != nullsb.append("SubscriptionType: " + getSubscriptionType() + ",");
        if (getClientToken() != nullsb.append("ClientToken: " + getClientToken() + ",");
        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 + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); 
        hashCode = prime * hashCode + ((getSshKey() == null) ? 0 : getSshKey().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 + ((getSubscriptionType() == null) ? 0 : getSubscriptionType().hashCode()); 
        hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().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 CreateHsmRequest == falsereturn false;
        CreateHsmRequest other = (CreateHsmRequest)obj;
        
        if (other.getSubnetId() == null ^ this.getSubnetId() == nullreturn false;
        if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == falsereturn false
        if (other.getSshKey() == null ^ this.getSshKey() == nullreturn false;
        if (other.getSshKey() != null && other.getSshKey().equals(this.getSshKey()) == 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.getSubscriptionType() == null ^ this.getSubscriptionType() == nullreturn false;
        if (other.getSubscriptionType() != null && other.getSubscriptionType().equals(this.getSubscriptionType()) == falsereturn false
        if (other.getClientToken() == null ^ this.getClientToken() == nullreturn false;
        if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == 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 CreateHsmRequest clone() {
        
            return (CreateHsmRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X