/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about an AWS CloudHSM cluster. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Cluster implements Serializable, Cloneable, StructuredPojo { /** ** The cluster's backup policy. *
*/ private String backupPolicy; /** ** A policy that defines how the service retains backups. *
*/ private BackupRetentionPolicy backupRetentionPolicy; /** ** The cluster's identifier (ID). *
*/ private String clusterId; /** ** The date and time when the cluster was created. *
*/ private java.util.Date createTimestamp; /** ** Contains information about the HSMs in the cluster. *
*/ private java.util.List* The type of HSM that the cluster contains. *
*/ private String hsmType; /** ** The default password for the cluster's Pre-Crypto Officer (PRECO) user. *
*/ private String preCoPassword; /** ** The identifier (ID) of the cluster's security group. *
*/ private String securityGroup; /** ** The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created * from a backup. *
*/ private String sourceBackupId; /** ** The cluster's state. *
*/ private String state; /** ** A description of the cluster's state. *
*/ private String stateMessage; /** ** A map from availability zone to the cluster’s subnet in that availability zone. *
*/ private java.util.Map* The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. *
*/ private String vpcId; /** ** Contains one or more certificates or a certificate signing request (CSR). *
*/ private Certificates certificates; /** ** The list of tags for the cluster. *
*/ private java.util.List* The cluster's backup policy. *
* * @param backupPolicy * The cluster's backup policy. * @see BackupPolicy */ public void setBackupPolicy(String backupPolicy) { this.backupPolicy = backupPolicy; } /** ** The cluster's backup policy. *
* * @return The cluster's backup policy. * @see BackupPolicy */ public String getBackupPolicy() { return this.backupPolicy; } /** ** The cluster's backup policy. *
* * @param backupPolicy * The cluster's backup policy. * @return Returns a reference to this object so that method calls can be chained together. * @see BackupPolicy */ public Cluster withBackupPolicy(String backupPolicy) { setBackupPolicy(backupPolicy); return this; } /** ** The cluster's backup policy. *
* * @param backupPolicy * The cluster's backup policy. * @return Returns a reference to this object so that method calls can be chained together. * @see BackupPolicy */ public Cluster withBackupPolicy(BackupPolicy backupPolicy) { this.backupPolicy = backupPolicy.toString(); return this; } /** ** 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 Cluster withBackupRetentionPolicy(BackupRetentionPolicy backupRetentionPolicy) { setBackupRetentionPolicy(backupRetentionPolicy); return this; } /** ** The cluster's identifier (ID). *
* * @param clusterId * The cluster's identifier (ID). */ public void setClusterId(String clusterId) { this.clusterId = clusterId; } /** ** The cluster's identifier (ID). *
* * @return The cluster's identifier (ID). */ public String getClusterId() { return this.clusterId; } /** ** The cluster's identifier (ID). *
* * @param clusterId * The cluster's identifier (ID). * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withClusterId(String clusterId) { setClusterId(clusterId); return this; } /** ** The date and time when the cluster was created. *
* * @param createTimestamp * The date and time when the cluster was created. */ public void setCreateTimestamp(java.util.Date createTimestamp) { this.createTimestamp = createTimestamp; } /** ** The date and time when the cluster was created. *
* * @return The date and time when the cluster was created. */ public java.util.Date getCreateTimestamp() { return this.createTimestamp; } /** ** The date and time when the cluster was created. *
* * @param createTimestamp * The date and time when the cluster was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withCreateTimestamp(java.util.Date createTimestamp) { setCreateTimestamp(createTimestamp); return this; } /** ** Contains information about the HSMs in the cluster. *
* * @return Contains information about the HSMs in the cluster. */ public java.util.List* Contains information about the HSMs in the cluster. *
* * @param hsms * Contains information about the HSMs in the cluster. */ public void setHsms(java.util.Collection* Contains information about the HSMs in the cluster. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setHsms(java.util.Collection)} or {@link #withHsms(java.util.Collection)} if you want to override the * existing values. *
* * @param hsms * Contains information about the HSMs in the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withHsms(Hsm... hsms) { if (this.hsms == null) { setHsms(new java.util.ArrayList* Contains information about the HSMs in the cluster. *
* * @param hsms * Contains information about the HSMs in the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withHsms(java.util.Collection* The type of HSM that the cluster contains. *
* * @param hsmType * The type of HSM that the cluster contains. */ public void setHsmType(String hsmType) { this.hsmType = hsmType; } /** ** The type of HSM that the cluster contains. *
* * @return The type of HSM that the cluster contains. */ public String getHsmType() { return this.hsmType; } /** ** The type of HSM that the cluster contains. *
* * @param hsmType * The type of HSM that the cluster contains. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withHsmType(String hsmType) { setHsmType(hsmType); return this; } /** ** The default password for the cluster's Pre-Crypto Officer (PRECO) user. *
* * @param preCoPassword * The default password for the cluster's Pre-Crypto Officer (PRECO) user. */ public void setPreCoPassword(String preCoPassword) { this.preCoPassword = preCoPassword; } /** ** The default password for the cluster's Pre-Crypto Officer (PRECO) user. *
* * @return The default password for the cluster's Pre-Crypto Officer (PRECO) user. */ public String getPreCoPassword() { return this.preCoPassword; } /** ** The default password for the cluster's Pre-Crypto Officer (PRECO) user. *
* * @param preCoPassword * The default password for the cluster's Pre-Crypto Officer (PRECO) user. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withPreCoPassword(String preCoPassword) { setPreCoPassword(preCoPassword); return this; } /** ** The identifier (ID) of the cluster's security group. *
* * @param securityGroup * The identifier (ID) of the cluster's security group. */ public void setSecurityGroup(String securityGroup) { this.securityGroup = securityGroup; } /** ** The identifier (ID) of the cluster's security group. *
* * @return The identifier (ID) of the cluster's security group. */ public String getSecurityGroup() { return this.securityGroup; } /** ** The identifier (ID) of the cluster's security group. *
* * @param securityGroup * The identifier (ID) of the cluster's security group. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withSecurityGroup(String securityGroup) { setSecurityGroup(securityGroup); return this; } /** ** The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created * from a backup. *
* * @param sourceBackupId * The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was * created from a backup. */ public void setSourceBackupId(String sourceBackupId) { this.sourceBackupId = sourceBackupId; } /** ** The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created * from a backup. *
* * @return The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was * created from a backup. */ public String getSourceBackupId() { return this.sourceBackupId; } /** ** The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created * from a backup. *
* * @param sourceBackupId * The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was * created from a backup. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withSourceBackupId(String sourceBackupId) { setSourceBackupId(sourceBackupId); return this; } /** ** The cluster's state. *
* * @param state * The cluster's state. * @see ClusterState */ public void setState(String state) { this.state = state; } /** ** The cluster's state. *
* * @return The cluster's state. * @see ClusterState */ public String getState() { return this.state; } /** ** The cluster's state. *
* * @param state * The cluster's state. * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterState */ public Cluster withState(String state) { setState(state); return this; } /** ** The cluster's state. *
* * @param state * The cluster's state. * @return Returns a reference to this object so that method calls can be chained together. * @see ClusterState */ public Cluster withState(ClusterState state) { this.state = state.toString(); return this; } /** ** A description of the cluster's state. *
* * @param stateMessage * A description of the cluster's state. */ public void setStateMessage(String stateMessage) { this.stateMessage = stateMessage; } /** ** A description of the cluster's state. *
* * @return A description of the cluster's state. */ public String getStateMessage() { return this.stateMessage; } /** ** A description of the cluster's state. *
* * @param stateMessage * A description of the cluster's state. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withStateMessage(String stateMessage) { setStateMessage(stateMessage); return this; } /** ** A map from availability zone to the cluster’s subnet in that availability zone. *
* * @return A map from availability zone to the cluster’s subnet in that availability zone. */ public java.util.Map* A map from availability zone to the cluster’s subnet in that availability zone. *
* * @param subnetMapping * A map from availability zone to the cluster’s subnet in that availability zone. */ public void setSubnetMapping(java.util.Map* A map from availability zone to the cluster’s subnet in that availability zone. *
* * @param subnetMapping * A map from availability zone to the cluster’s subnet in that availability zone. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withSubnetMapping(java.util.Map* The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. *
* * @param vpcId * The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. *
* * @return The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. */ public String getVpcId() { return this.vpcId; } /** ** The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. *
* * @param vpcId * The identifier (ID) of the virtual private cloud (VPC) that contains the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** Contains one or more certificates or a certificate signing request (CSR). *
* * @param certificates * Contains one or more certificates or a certificate signing request (CSR). */ public void setCertificates(Certificates certificates) { this.certificates = certificates; } /** ** Contains one or more certificates or a certificate signing request (CSR). *
* * @return Contains one or more certificates or a certificate signing request (CSR). */ public Certificates getCertificates() { return this.certificates; } /** ** Contains one or more certificates or a certificate signing request (CSR). *
* * @param certificates * Contains one or more certificates or a certificate signing request (CSR). * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withCertificates(Certificates certificates) { setCertificates(certificates); return this; } /** ** The list of tags for the cluster. *
* * @return The list of tags for the cluster. */ public java.util.List* The list of tags for the cluster. *
* * @param tagList * The list of tags for the cluster. */ public void setTagList(java.util.Collection* The list of tags for the cluster. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagList(java.util.Collection)} or {@link #withTagList(java.util.Collection)} if you want to override * the existing values. *
* * @param tagList * The list of tags for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withTagList(Tag... tagList) { if (this.tagList == null) { setTagList(new java.util.ArrayList* The list of tags for the cluster. *
* * @param tagList * The list of tags for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Cluster withTagList(java.util.Collection