/* * 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 InitializeClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters. *
*/ private String clusterId; /** ** The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in * PEM format and can contain a maximum of 5000 characters. *
*/ private String signedCert; /** ** The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. * You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and * thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 * characters. *
*/ private String trustAnchor; /** ** The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters. *
* * @param clusterId * The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use * DescribeClusters. */ public void setClusterId(String clusterId) { this.clusterId = clusterId; } /** ** The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters. *
* * @return The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use * DescribeClusters. */ public String getClusterId() { return this.clusterId; } /** ** The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters. *
* * @param clusterId * The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use * DescribeClusters. * @return Returns a reference to this object so that method calls can be chained together. */ public InitializeClusterRequest withClusterId(String clusterId) { setClusterId(clusterId); return this; } /** ** The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in * PEM format and can contain a maximum of 5000 characters. *
* * @param signedCert * The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must * be in PEM format and can contain a maximum of 5000 characters. */ public void setSignedCert(String signedCert) { this.signedCert = signedCert; } /** ** The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in * PEM format and can contain a maximum of 5000 characters. *
* * @return The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must * be in PEM format and can contain a maximum of 5000 characters. */ public String getSignedCert() { return this.signedCert; } /** ** The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in * PEM format and can contain a maximum of 5000 characters. *
* * @param signedCert * The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must * be in PEM format and can contain a maximum of 5000 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public InitializeClusterRequest withSignedCert(String signedCert) { setSignedCert(signedCert); return this; } /** ** The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. * You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and * thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 * characters. *
* * @param trustAnchor * The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster * certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be * directly available, and thus must be the root certificate. The certificate must be in PEM format and can * contain a maximum of 5000 characters. */ public void setTrustAnchor(String trustAnchor) { this.trustAnchor = trustAnchor; } /** ** The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. * You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and * thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 * characters. *
* * @return The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster * certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be * directly available, and thus must be the root certificate. The certificate must be in PEM format and can * contain a maximum of 5000 characters. */ public String getTrustAnchor() { return this.trustAnchor; } /** ** The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. * You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and * thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 * characters. *
* * @param trustAnchor * The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster * certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be * directly available, and thus must be the root certificate. The certificate must be in PEM format and can * contain a maximum of 5000 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public InitializeClusterRequest withTrustAnchor(String trustAnchor) { setTrustAnchor(trustAnchor); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getClusterId() != null) sb.append("ClusterId: ").append(getClusterId()).append(","); if (getSignedCert() != null) sb.append("SignedCert: ").append(getSignedCert()).append(","); if (getTrustAnchor() != null) sb.append("TrustAnchor: ").append(getTrustAnchor()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InitializeClusterRequest == false) return false; InitializeClusterRequest other = (InitializeClusterRequest) obj; if (other.getClusterId() == null ^ this.getClusterId() == null) return false; if (other.getClusterId() != null && other.getClusterId().equals(this.getClusterId()) == false) return false; if (other.getSignedCert() == null ^ this.getSignedCert() == null) return false; if (other.getSignedCert() != null && other.getSignedCert().equals(this.getSignedCert()) == false) return false; if (other.getTrustAnchor() == null ^ this.getTrustAnchor() == null) return false; if (other.getTrustAnchor() != null && other.getTrustAnchor().equals(this.getTrustAnchor()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterId() == null) ? 0 : getClusterId().hashCode()); hashCode = prime * hashCode + ((getSignedCert() == null) ? 0 : getSignedCert().hashCode()); hashCode = prime * hashCode + ((getTrustAnchor() == null) ? 0 : getTrustAnchor().hashCode()); return hashCode; } @Override public InitializeClusterRequest clone() { return (InitializeClusterRequest) super.clone(); } }