/* * Copyright 2018-2023 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.cloudhsmv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* A policy that defines how the service retains backups. *

*/ private BackupRetentionPolicy backupRetentionPolicy; /** *

* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. *

*/ private String hsmType; /** *

* The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *

*/ private String sourceBackupId; /** *

* The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *

* */ private java.util.List subnetIds; /** *

* Tags to apply to the CloudHSM cluster during creation. *

*/ private java.util.List tagList; /** *

* A policy that defines how the service retains backups. *

* * @param backupRetentionPolicy * A policy that defines how the service retains backups. */ public void setBackupRetentionPolicy(BackupRetentionPolicy backupRetentionPolicy) { this.backupRetentionPolicy = backupRetentionPolicy; } /** *

* A policy that defines how the service retains backups. *

* * @return A policy that defines how the service retains backups. */ public BackupRetentionPolicy getBackupRetentionPolicy() { return this.backupRetentionPolicy; } /** *

* A policy that defines how the service retains backups. *

* * @param backupRetentionPolicy * A policy that defines how the service retains backups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withBackupRetentionPolicy(BackupRetentionPolicy backupRetentionPolicy) { setBackupRetentionPolicy(backupRetentionPolicy); return this; } /** *

* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. *

* * @param hsmType * The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. */ public void setHsmType(String hsmType) { this.hsmType = hsmType; } /** *

* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. *

* * @return The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. */ public String getHsmType() { return this.hsmType; } /** *

* The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. *

* * @param hsmType * The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withHsmType(String hsmType) { setHsmType(hsmType); return this; } /** *

* The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *

* * @param sourceBackupId * The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. */ public void setSourceBackupId(String sourceBackupId) { this.sourceBackupId = sourceBackupId; } /** *

* The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *

* * @return The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. */ public String getSourceBackupId() { return this.sourceBackupId; } /** *

* The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead * of creating a new cluster. To find the backup ID, use DescribeBackups. *

* * @param sourceBackupId * The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup * instead of creating a new cluster. To find the backup ID, use DescribeBackups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withSourceBackupId(String sourceBackupId) { setSourceBackupId(sourceBackupId); return this; } /** *

* The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If * you specify multiple subnets, they must meet the following criteria: *

* * * @return The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one * subnet. If you specify multiple subnets, they must meet the following criteria:

*