/* * 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.acmpca.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 CreateCertificateAuthorityRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject * information. *
*/ private CertificateAuthorityConfiguration certificateAuthorityConfiguration; /** ** Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate validation * mechanisms to be disabled. *
** The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and will fail
* if other parameters such as CustomCname
or ExpirationInDays
are included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket naming
* rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration * and CrlConfiguration * types. *
*/ private RevocationConfiguration revocationConfiguration; /** ** The type of the certificate authority. *
*/ private String certificateAuthorityType; /** ** Custom string that can be used to distinguish between calls to the CreateCertificateAuthority action. * Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, if you call * CreateCertificateAuthority multiple times with the same idempotency token within five minutes, Amazon Web * Services Private CA recognizes that you are requesting only certificate authority and will issue only one. If you * change the idempotency token for each call, Amazon Web Services Private CA recognizes that you are requesting * multiple certificate authorities. *
*/ private String idempotencyToken; /** ** Specifies a cryptographic key management compliance standard used for handling CA keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for KeyStorageSecurityStandard
.
* Failure to do this results in an InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage and * security compliance of Amazon Web Services Private CA private keys. *
** Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. * For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. *
*/ private java.util.List* Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or * short-lived certificates that may optionally omit revocation because they expire quickly. Short-lived certificate * validity is limited to seven days. *
** The default value is GENERAL_PURPOSE. *
*/ private String usageMode; /** ** Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject * information. *
* * @param certificateAuthorityConfiguration * Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate * subject information. */ public void setCertificateAuthorityConfiguration(CertificateAuthorityConfiguration certificateAuthorityConfiguration) { this.certificateAuthorityConfiguration = certificateAuthorityConfiguration; } /** ** Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject * information. *
* * @return Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate * subject information. */ public CertificateAuthorityConfiguration getCertificateAuthorityConfiguration() { return this.certificateAuthorityConfiguration; } /** ** Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject * information. *
* * @param certificateAuthorityConfiguration * Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate * subject information. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCertificateAuthorityRequest withCertificateAuthorityConfiguration(CertificateAuthorityConfiguration certificateAuthorityConfiguration) { setCertificateAuthorityConfiguration(certificateAuthorityConfiguration); return this; } /** ** Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate validation * mechanisms to be disabled. *
** The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and will fail
* if other parameters such as CustomCname
or ExpirationInDays
are included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket naming
* rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration * and CrlConfiguration * types. *
* * @param revocationConfiguration * Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate * validation mechanisms to be disabled.* The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and
* will fail if other parameters such as CustomCname
or ExpirationInDays
are
* included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket
* naming rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a * CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration and CrlConfiguration types. */ public void setRevocationConfiguration(RevocationConfiguration revocationConfiguration) { this.revocationConfiguration = revocationConfiguration; } /** *
* Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate validation * mechanisms to be disabled. *
** The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and will fail
* if other parameters such as CustomCname
or ExpirationInDays
are included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket naming
* rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration * and CrlConfiguration * types. *
* * @return Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate * validation mechanisms to be disabled.* The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and
* will fail if other parameters such as CustomCname
or ExpirationInDays
are
* included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket
* naming rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in * a CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration and CrlConfiguration types. */ public RevocationConfiguration getRevocationConfiguration() { return this.revocationConfiguration; } /** *
* Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate validation * mechanisms to be disabled. *
** The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and will fail
* if other parameters such as CustomCname
or ExpirationInDays
are included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket naming
* rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration * and CrlConfiguration * types. *
* * @param revocationConfiguration * Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. The default is for both certificate * validation mechanisms to be disabled.* The following requirements apply to revocation configurations. *
*
* A configuration disabling CRLs or OCSP must contain only the Enabled=False
parameter, and
* will fail if other parameters such as CustomCname
or ExpirationInDays
are
* included.
*
* In a CRL configuration, the S3BucketName
parameter must conform to Amazon S3 bucket
* naming rules.
*
* A configuration containing a custom Canonical Name (CNAME) parameter for CRLs or OCSP must conform to RFC2396 restrictions on the use of special characters in a * CNAME. *
** In a CRL or OCSP configuration, the value of a CNAME parameter must not include a protocol prefix such as * "http://" or "https://". *
** For more information, see the OcspConfiguration and CrlConfiguration types. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCertificateAuthorityRequest withRevocationConfiguration(RevocationConfiguration revocationConfiguration) { setRevocationConfiguration(revocationConfiguration); return this; } /** *
* The type of the certificate authority. *
* * @param certificateAuthorityType * The type of the certificate authority. * @see CertificateAuthorityType */ public void setCertificateAuthorityType(String certificateAuthorityType) { this.certificateAuthorityType = certificateAuthorityType; } /** ** The type of the certificate authority. *
* * @return The type of the certificate authority. * @see CertificateAuthorityType */ public String getCertificateAuthorityType() { return this.certificateAuthorityType; } /** ** The type of the certificate authority. *
* * @param certificateAuthorityType * The type of the certificate authority. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityType */ public CreateCertificateAuthorityRequest withCertificateAuthorityType(String certificateAuthorityType) { setCertificateAuthorityType(certificateAuthorityType); return this; } /** ** The type of the certificate authority. *
* * @param certificateAuthorityType * The type of the certificate authority. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityType */ public CreateCertificateAuthorityRequest withCertificateAuthorityType(CertificateAuthorityType certificateAuthorityType) { this.certificateAuthorityType = certificateAuthorityType.toString(); return this; } /** ** Custom string that can be used to distinguish between calls to the CreateCertificateAuthority action. * Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, if you call * CreateCertificateAuthority multiple times with the same idempotency token within five minutes, Amazon Web * Services Private CA recognizes that you are requesting only certificate authority and will issue only one. If you * change the idempotency token for each call, Amazon Web Services Private CA recognizes that you are requesting * multiple certificate authorities. *
* * @param idempotencyToken * Custom string that can be used to distinguish between calls to the CreateCertificateAuthority * action. Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, * if you call CreateCertificateAuthority multiple times with the same idempotency token within five * minutes, Amazon Web Services Private CA recognizes that you are requesting only certificate authority and * will issue only one. If you change the idempotency token for each call, Amazon Web Services Private CA * recognizes that you are requesting multiple certificate authorities. */ public void setIdempotencyToken(String idempotencyToken) { this.idempotencyToken = idempotencyToken; } /** ** Custom string that can be used to distinguish between calls to the CreateCertificateAuthority action. * Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, if you call * CreateCertificateAuthority multiple times with the same idempotency token within five minutes, Amazon Web * Services Private CA recognizes that you are requesting only certificate authority and will issue only one. If you * change the idempotency token for each call, Amazon Web Services Private CA recognizes that you are requesting * multiple certificate authorities. *
* * @return Custom string that can be used to distinguish between calls to the CreateCertificateAuthority * action. Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, * if you call CreateCertificateAuthority multiple times with the same idempotency token within five * minutes, Amazon Web Services Private CA recognizes that you are requesting only certificate authority and * will issue only one. If you change the idempotency token for each call, Amazon Web Services Private CA * recognizes that you are requesting multiple certificate authorities. */ public String getIdempotencyToken() { return this.idempotencyToken; } /** ** Custom string that can be used to distinguish between calls to the CreateCertificateAuthority action. * Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, if you call * CreateCertificateAuthority multiple times with the same idempotency token within five minutes, Amazon Web * Services Private CA recognizes that you are requesting only certificate authority and will issue only one. If you * change the idempotency token for each call, Amazon Web Services Private CA recognizes that you are requesting * multiple certificate authorities. *
* * @param idempotencyToken * Custom string that can be used to distinguish between calls to the CreateCertificateAuthority * action. Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, * if you call CreateCertificateAuthority multiple times with the same idempotency token within five * minutes, Amazon Web Services Private CA recognizes that you are requesting only certificate authority and * will issue only one. If you change the idempotency token for each call, Amazon Web Services Private CA * recognizes that you are requesting multiple certificate authorities. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCertificateAuthorityRequest withIdempotencyToken(String idempotencyToken) { setIdempotencyToken(idempotencyToken); return this; } /** ** Specifies a cryptographic key management compliance standard used for handling CA keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for KeyStorageSecurityStandard
.
* Failure to do this results in an InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage and * security compliance of Amazon Web Services Private CA private keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for
* KeyStorageSecurityStandard
. Failure to do this results in an
* InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys. *
* @see KeyStorageSecurityStandard */ public void setKeyStorageSecurityStandard(String keyStorageSecurityStandard) { this.keyStorageSecurityStandard = keyStorageSecurityStandard; } /** ** Specifies a cryptographic key management compliance standard used for handling CA keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for KeyStorageSecurityStandard
.
* Failure to do this results in an InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage and * security compliance of Amazon Web Services Private CA private keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you
* must provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for
* KeyStorageSecurityStandard
. Failure to do this results in an
* InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys. *
* @see KeyStorageSecurityStandard */ public String getKeyStorageSecurityStandard() { return this.keyStorageSecurityStandard; } /** ** Specifies a cryptographic key management compliance standard used for handling CA keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for KeyStorageSecurityStandard
.
* Failure to do this results in an InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage and * security compliance of Amazon Web Services Private CA private keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for
* KeyStorageSecurityStandard
. Failure to do this results in an
* InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys. *
* @return Returns a reference to this object so that method calls can be chained together. * @see KeyStorageSecurityStandard */ public CreateCertificateAuthorityRequest withKeyStorageSecurityStandard(String keyStorageSecurityStandard) { setKeyStorageSecurityStandard(keyStorageSecurityStandard); return this; } /** ** Specifies a cryptographic key management compliance standard used for handling CA keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for KeyStorageSecurityStandard
.
* Failure to do this results in an InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage and * security compliance of Amazon Web Services Private CA private keys. *
** Default: FIPS_140_2_LEVEL_3_OR_HIGHER *
*
* Some Amazon Web Services Regions do not support the default. When creating a CA in these Regions, you must
* provide FIPS_140_2_LEVEL_2_OR_HIGHER
as the argument for
* KeyStorageSecurityStandard
. Failure to do this results in an
* InvalidArgsException
with the message,
* "A certificate authority cannot be created in this region with the specified security standard."
*
* For information about security standard support in various Regions, see Storage * and security compliance of Amazon Web Services Private CA private keys. *
* @return Returns a reference to this object so that method calls can be chained together. * @see KeyStorageSecurityStandard */ public CreateCertificateAuthorityRequest withKeyStorageSecurityStandard(KeyStorageSecurityStandard keyStorageSecurityStandard) { this.keyStorageSecurityStandard = keyStorageSecurityStandard.toString(); return this; } /** ** Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. * For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. *
* * @return Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a * private CA. For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. */ public java.util.List* Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. * For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. *
* * @param tags * Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a * private CA. For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. */ public void setTags(java.util.Collection* Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. * For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a * private CA. For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCertificateAuthorityRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. * For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. *
* * @param tags * Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a * private CA. For information using tags with IAM to manage permissions, see Controlling Access Using IAM * Tags. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCertificateAuthorityRequest withTags(java.util.Collection* Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or * short-lived certificates that may optionally omit revocation because they expire quickly. Short-lived certificate * validity is limited to seven days. *
** The default value is GENERAL_PURPOSE. *
* * @param usageMode * Specifies whether the CA issues general-purpose certificates that typically require a revocation * mechanism, or short-lived certificates that may optionally omit revocation because they expire quickly. * Short-lived certificate validity is limited to seven days. ** The default value is GENERAL_PURPOSE. * @see CertificateAuthorityUsageMode */ public void setUsageMode(String usageMode) { this.usageMode = usageMode; } /** *
* Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or * short-lived certificates that may optionally omit revocation because they expire quickly. Short-lived certificate * validity is limited to seven days. *
** The default value is GENERAL_PURPOSE. *
* * @return Specifies whether the CA issues general-purpose certificates that typically require a revocation * mechanism, or short-lived certificates that may optionally omit revocation because they expire quickly. * Short-lived certificate validity is limited to seven days. ** The default value is GENERAL_PURPOSE. * @see CertificateAuthorityUsageMode */ public String getUsageMode() { return this.usageMode; } /** *
* Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or * short-lived certificates that may optionally omit revocation because they expire quickly. Short-lived certificate * validity is limited to seven days. *
** The default value is GENERAL_PURPOSE. *
* * @param usageMode * Specifies whether the CA issues general-purpose certificates that typically require a revocation * mechanism, or short-lived certificates that may optionally omit revocation because they expire quickly. * Short-lived certificate validity is limited to seven days. ** The default value is GENERAL_PURPOSE. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityUsageMode */ public CreateCertificateAuthorityRequest withUsageMode(String usageMode) { setUsageMode(usageMode); return this; } /** *
* Specifies whether the CA issues general-purpose certificates that typically require a revocation mechanism, or * short-lived certificates that may optionally omit revocation because they expire quickly. Short-lived certificate * validity is limited to seven days. *
** The default value is GENERAL_PURPOSE. *
* * @param usageMode * Specifies whether the CA issues general-purpose certificates that typically require a revocation * mechanism, or short-lived certificates that may optionally omit revocation because they expire quickly. * Short-lived certificate validity is limited to seven days. ** The default value is GENERAL_PURPOSE. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityUsageMode */ public CreateCertificateAuthorityRequest withUsageMode(CertificateAuthorityUsageMode usageMode) { this.usageMode = usageMode.toString(); 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 (getCertificateAuthorityConfiguration() != null) sb.append("CertificateAuthorityConfiguration: ").append(getCertificateAuthorityConfiguration()).append(","); if (getRevocationConfiguration() != null) sb.append("RevocationConfiguration: ").append(getRevocationConfiguration()).append(","); if (getCertificateAuthorityType() != null) sb.append("CertificateAuthorityType: ").append(getCertificateAuthorityType()).append(","); if (getIdempotencyToken() != null) sb.append("IdempotencyToken: ").append(getIdempotencyToken()).append(","); if (getKeyStorageSecurityStandard() != null) sb.append("KeyStorageSecurityStandard: ").append(getKeyStorageSecurityStandard()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getUsageMode() != null) sb.append("UsageMode: ").append(getUsageMode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateCertificateAuthorityRequest == false) return false; CreateCertificateAuthorityRequest other = (CreateCertificateAuthorityRequest) obj; if (other.getCertificateAuthorityConfiguration() == null ^ this.getCertificateAuthorityConfiguration() == null) return false; if (other.getCertificateAuthorityConfiguration() != null && other.getCertificateAuthorityConfiguration().equals(this.getCertificateAuthorityConfiguration()) == false) return false; if (other.getRevocationConfiguration() == null ^ this.getRevocationConfiguration() == null) return false; if (other.getRevocationConfiguration() != null && other.getRevocationConfiguration().equals(this.getRevocationConfiguration()) == false) return false; if (other.getCertificateAuthorityType() == null ^ this.getCertificateAuthorityType() == null) return false; if (other.getCertificateAuthorityType() != null && other.getCertificateAuthorityType().equals(this.getCertificateAuthorityType()) == false) return false; if (other.getIdempotencyToken() == null ^ this.getIdempotencyToken() == null) return false; if (other.getIdempotencyToken() != null && other.getIdempotencyToken().equals(this.getIdempotencyToken()) == false) return false; if (other.getKeyStorageSecurityStandard() == null ^ this.getKeyStorageSecurityStandard() == null) return false; if (other.getKeyStorageSecurityStandard() != null && other.getKeyStorageSecurityStandard().equals(this.getKeyStorageSecurityStandard()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getUsageMode() == null ^ this.getUsageMode() == null) return false; if (other.getUsageMode() != null && other.getUsageMode().equals(this.getUsageMode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificateAuthorityConfiguration() == null) ? 0 : getCertificateAuthorityConfiguration().hashCode()); hashCode = prime * hashCode + ((getRevocationConfiguration() == null) ? 0 : getRevocationConfiguration().hashCode()); hashCode = prime * hashCode + ((getCertificateAuthorityType() == null) ? 0 : getCertificateAuthorityType().hashCode()); hashCode = prime * hashCode + ((getIdempotencyToken() == null) ? 0 : getIdempotencyToken().hashCode()); hashCode = prime * hashCode + ((getKeyStorageSecurityStandard() == null) ? 0 : getKeyStorageSecurityStandard().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getUsageMode() == null) ? 0 : getUsageMode().hashCode()); return hashCode; } @Override public CreateCertificateAuthorityRequest clone() { return (CreateCertificateAuthorityRequest) super.clone(); } }