/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Contains information about your private certificate authority (CA). Your private CA can issue and revoke X.509 * digital certificates. Digital certificates verify that the entity named in the certificate Subject field owns * or controls the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority action to create your private CA. You must then call the GetCertificateAuthorityCertificate action to retrieve a private CA certificate signing request (CSR). Sign the * CSR with your Amazon Web Services Private CA-hosted or on-premises root or subordinate CA certificate. Call the * ImportCertificateAuthorityCertificate action to import the signed certificate into Certificate Manager (ACM). *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CertificateAuthority implements Serializable, Cloneable, StructuredPojo { /** *

* Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . *

*/ private String arn; /** *

* The Amazon Web Services account ID that owns the certificate authority. *

*/ private String ownerAccount; /** *

* Date and time at which your private CA was created. *

*/ private java.util.Date createdAt; /** *

* Date and time at which your private CA was last updated. *

*/ private java.util.Date lastStateChangeAt; /** *

* Type of your private CA. *

*/ private String type; /** *

* Serial number of your private CA. *

*/ private String serial; /** *

* Status of your private CA. *

*/ private String status; /** *

* Date and time before which your private CA certificate is not valid. *

*/ private java.util.Date notBefore; /** *

* Date and time after which your private CA certificate is not valid. *

*/ private java.util.Date notAfter; /** *

* Reason the request to create your private CA failed. *

*/ private String failureReason; /** *

* Your private CA configuration. *

*/ private CertificateAuthorityConfiguration certificateAuthorityConfiguration; /** *

* Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation list * (CRL) created and maintained by your private CA. *

*/ private RevocationConfiguration revocationConfiguration; /** *

* The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. *

*/ private java.util.Date restorableUntil; /** *

* Defines a cryptographic key management compliance standard used for handling CA keys. *

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly * specify this parameter and value when creating a CA in that Region. Specifying a different value (or no value) * results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." *

*/ private String keyStorageSecurityStandard; /** *

* 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; /** *

* Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . *

* * @param arn * Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . */ public void setArn(String arn) { this.arn = arn; } /** *

* Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . *

* * @return Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . */ public String getArn() { return this.arn; } /** *

* Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . *

* * @param arn * Amazon Resource Name (ARN) for your private certificate authority (CA). The format is * 12345678-1234-1234-1234-123456789012 . * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withArn(String arn) { setArn(arn); return this; } /** *

* The Amazon Web Services account ID that owns the certificate authority. *

* * @param ownerAccount * The Amazon Web Services account ID that owns the certificate authority. */ public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; } /** *

* The Amazon Web Services account ID that owns the certificate authority. *

* * @return The Amazon Web Services account ID that owns the certificate authority. */ public String getOwnerAccount() { return this.ownerAccount; } /** *

* The Amazon Web Services account ID that owns the certificate authority. *

* * @param ownerAccount * The Amazon Web Services account ID that owns the certificate authority. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withOwnerAccount(String ownerAccount) { setOwnerAccount(ownerAccount); return this; } /** *

* Date and time at which your private CA was created. *

* * @param createdAt * Date and time at which your private CA was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* Date and time at which your private CA was created. *

* * @return Date and time at which your private CA was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* Date and time at which your private CA was created. *

* * @param createdAt * Date and time at which your private CA was created. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* Date and time at which your private CA was last updated. *

* * @param lastStateChangeAt * Date and time at which your private CA was last updated. */ public void setLastStateChangeAt(java.util.Date lastStateChangeAt) { this.lastStateChangeAt = lastStateChangeAt; } /** *

* Date and time at which your private CA was last updated. *

* * @return Date and time at which your private CA was last updated. */ public java.util.Date getLastStateChangeAt() { return this.lastStateChangeAt; } /** *

* Date and time at which your private CA was last updated. *

* * @param lastStateChangeAt * Date and time at which your private CA was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withLastStateChangeAt(java.util.Date lastStateChangeAt) { setLastStateChangeAt(lastStateChangeAt); return this; } /** *

* Type of your private CA. *

* * @param type * Type of your private CA. * @see CertificateAuthorityType */ public void setType(String type) { this.type = type; } /** *

* Type of your private CA. *

* * @return Type of your private CA. * @see CertificateAuthorityType */ public String getType() { return this.type; } /** *

* Type of your private CA. *

* * @param type * Type of your private CA. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityType */ public CertificateAuthority withType(String type) { setType(type); return this; } /** *

* Type of your private CA. *

* * @param type * Type of your private CA. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityType */ public CertificateAuthority withType(CertificateAuthorityType type) { this.type = type.toString(); return this; } /** *

* Serial number of your private CA. *

* * @param serial * Serial number of your private CA. */ public void setSerial(String serial) { this.serial = serial; } /** *

* Serial number of your private CA. *

* * @return Serial number of your private CA. */ public String getSerial() { return this.serial; } /** *

* Serial number of your private CA. *

* * @param serial * Serial number of your private CA. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withSerial(String serial) { setSerial(serial); return this; } /** *

* Status of your private CA. *

* * @param status * Status of your private CA. * @see CertificateAuthorityStatus */ public void setStatus(String status) { this.status = status; } /** *

* Status of your private CA. *

* * @return Status of your private CA. * @see CertificateAuthorityStatus */ public String getStatus() { return this.status; } /** *

* Status of your private CA. *

* * @param status * Status of your private CA. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityStatus */ public CertificateAuthority withStatus(String status) { setStatus(status); return this; } /** *

* Status of your private CA. *

* * @param status * Status of your private CA. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateAuthorityStatus */ public CertificateAuthority withStatus(CertificateAuthorityStatus status) { this.status = status.toString(); return this; } /** *

* Date and time before which your private CA certificate is not valid. *

* * @param notBefore * Date and time before which your private CA certificate is not valid. */ public void setNotBefore(java.util.Date notBefore) { this.notBefore = notBefore; } /** *

* Date and time before which your private CA certificate is not valid. *

* * @return Date and time before which your private CA certificate is not valid. */ public java.util.Date getNotBefore() { return this.notBefore; } /** *

* Date and time before which your private CA certificate is not valid. *

* * @param notBefore * Date and time before which your private CA certificate is not valid. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withNotBefore(java.util.Date notBefore) { setNotBefore(notBefore); return this; } /** *

* Date and time after which your private CA certificate is not valid. *

* * @param notAfter * Date and time after which your private CA certificate is not valid. */ public void setNotAfter(java.util.Date notAfter) { this.notAfter = notAfter; } /** *

* Date and time after which your private CA certificate is not valid. *

* * @return Date and time after which your private CA certificate is not valid. */ public java.util.Date getNotAfter() { return this.notAfter; } /** *

* Date and time after which your private CA certificate is not valid. *

* * @param notAfter * Date and time after which your private CA certificate is not valid. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withNotAfter(java.util.Date notAfter) { setNotAfter(notAfter); return this; } /** *

* Reason the request to create your private CA failed. *

* * @param failureReason * Reason the request to create your private CA failed. * @see FailureReason */ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** *

* Reason the request to create your private CA failed. *

* * @return Reason the request to create your private CA failed. * @see FailureReason */ public String getFailureReason() { return this.failureReason; } /** *

* Reason the request to create your private CA failed. *

* * @param failureReason * Reason the request to create your private CA failed. * @return Returns a reference to this object so that method calls can be chained together. * @see FailureReason */ public CertificateAuthority withFailureReason(String failureReason) { setFailureReason(failureReason); return this; } /** *

* Reason the request to create your private CA failed. *

* * @param failureReason * Reason the request to create your private CA failed. * @return Returns a reference to this object so that method calls can be chained together. * @see FailureReason */ public CertificateAuthority withFailureReason(FailureReason failureReason) { this.failureReason = failureReason.toString(); return this; } /** *

* Your private CA configuration. *

* * @param certificateAuthorityConfiguration * Your private CA configuration. */ public void setCertificateAuthorityConfiguration(CertificateAuthorityConfiguration certificateAuthorityConfiguration) { this.certificateAuthorityConfiguration = certificateAuthorityConfiguration; } /** *

* Your private CA configuration. *

* * @return Your private CA configuration. */ public CertificateAuthorityConfiguration getCertificateAuthorityConfiguration() { return this.certificateAuthorityConfiguration; } /** *

* Your private CA configuration. *

* * @param certificateAuthorityConfiguration * Your private CA configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withCertificateAuthorityConfiguration(CertificateAuthorityConfiguration certificateAuthorityConfiguration) { setCertificateAuthorityConfiguration(certificateAuthorityConfiguration); return this; } /** *

* Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation list * (CRL) created and maintained by your private CA. *

* * @param revocationConfiguration * Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation * list (CRL) created and maintained by your private CA. */ public void setRevocationConfiguration(RevocationConfiguration revocationConfiguration) { this.revocationConfiguration = revocationConfiguration; } /** *

* Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation list * (CRL) created and maintained by your private CA. *

* * @return Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation * list (CRL) created and maintained by your private CA. */ public RevocationConfiguration getRevocationConfiguration() { return this.revocationConfiguration; } /** *

* Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation list * (CRL) created and maintained by your private CA. *

* * @param revocationConfiguration * Information about the Online Certificate Status Protocol (OCSP) configuration or certificate revocation * list (CRL) created and maintained by your private CA. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withRevocationConfiguration(RevocationConfiguration revocationConfiguration) { setRevocationConfiguration(revocationConfiguration); return this; } /** *

* The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. *

* * @param restorableUntil * The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. */ public void setRestorableUntil(java.util.Date restorableUntil) { this.restorableUntil = restorableUntil; } /** *

* The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. *

* * @return The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. */ public java.util.Date getRestorableUntil() { return this.restorableUntil; } /** *

* The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. *

* * @param restorableUntil * The period during which a deleted CA can be restored. For more information, see the * PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest action. * @return Returns a reference to this object so that method calls can be chained together. */ public CertificateAuthority withRestorableUntil(java.util.Date restorableUntil) { setRestorableUntil(restorableUntil); return this; } /** *

* Defines a cryptographic key management compliance standard used for handling CA keys. *

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly * specify this parameter and value when creating a CA in that Region. Specifying a different value (or no value) * results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." *

* * @param keyStorageSecurityStandard * Defines a cryptographic key management compliance standard used for handling CA keys.

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must * explicitly specify this parameter and value when creating a CA in that Region. Specifying a different * value (or no value) results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." * @see KeyStorageSecurityStandard */ public void setKeyStorageSecurityStandard(String keyStorageSecurityStandard) { this.keyStorageSecurityStandard = keyStorageSecurityStandard; } /** *

* Defines a cryptographic key management compliance standard used for handling CA keys. *

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly * specify this parameter and value when creating a CA in that Region. Specifying a different value (or no value) * results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." *

* * @return Defines a cryptographic key management compliance standard used for handling CA keys.

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must * explicitly specify this parameter and value when creating a CA in that Region. Specifying a different * value (or no value) results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." * @see KeyStorageSecurityStandard */ public String getKeyStorageSecurityStandard() { return this.keyStorageSecurityStandard; } /** *

* Defines a cryptographic key management compliance standard used for handling CA keys. *

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly * specify this parameter and value when creating a CA in that Region. Specifying a different value (or no value) * results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." *

* * @param keyStorageSecurityStandard * Defines a cryptographic key management compliance standard used for handling CA keys.

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must * explicitly specify this parameter and value when creating a CA in that Region. Specifying a different * value (or no value) results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." * @return Returns a reference to this object so that method calls can be chained together. * @see KeyStorageSecurityStandard */ public CertificateAuthority withKeyStorageSecurityStandard(String keyStorageSecurityStandard) { setKeyStorageSecurityStandard(keyStorageSecurityStandard); return this; } /** *

* Defines a cryptographic key management compliance standard used for handling CA keys. *

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly * specify this parameter and value when creating a CA in that Region. Specifying a different value (or no value) * results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." *

* * @param keyStorageSecurityStandard * Defines a cryptographic key management compliance standard used for handling CA keys.

*

* Default: FIPS_140_2_LEVEL_3_OR_HIGHER *

*

* Note: Amazon Web Services Region ap-northeast-3 supports only FIPS_140_2_LEVEL_2_OR_HIGHER. You must * explicitly specify this parameter and value when creating a CA in that Region. Specifying a different * value (or no value) results in an InvalidArgsException with the message * "A certificate authority cannot be created in this region with the specified security standard." * @return Returns a reference to this object so that method calls can be chained together. * @see KeyStorageSecurityStandard */ public CertificateAuthority withKeyStorageSecurityStandard(KeyStorageSecurityStandard keyStorageSecurityStandard) { this.keyStorageSecurityStandard = keyStorageSecurityStandard.toString(); 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. * @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 CertificateAuthority 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 CertificateAuthority 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getOwnerAccount() != null) sb.append("OwnerAccount: ").append(getOwnerAccount()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getLastStateChangeAt() != null) sb.append("LastStateChangeAt: ").append(getLastStateChangeAt()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getSerial() != null) sb.append("Serial: ").append(getSerial()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getNotBefore() != null) sb.append("NotBefore: ").append(getNotBefore()).append(","); if (getNotAfter() != null) sb.append("NotAfter: ").append(getNotAfter()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()).append(","); if (getCertificateAuthorityConfiguration() != null) sb.append("CertificateAuthorityConfiguration: ").append(getCertificateAuthorityConfiguration()).append(","); if (getRevocationConfiguration() != null) sb.append("RevocationConfiguration: ").append(getRevocationConfiguration()).append(","); if (getRestorableUntil() != null) sb.append("RestorableUntil: ").append(getRestorableUntil()).append(","); if (getKeyStorageSecurityStandard() != null) sb.append("KeyStorageSecurityStandard: ").append(getKeyStorageSecurityStandard()).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 CertificateAuthority == false) return false; CertificateAuthority other = (CertificateAuthority) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == null) return false; if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getLastStateChangeAt() == null ^ this.getLastStateChangeAt() == null) return false; if (other.getLastStateChangeAt() != null && other.getLastStateChangeAt().equals(this.getLastStateChangeAt()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getSerial() == null ^ this.getSerial() == null) return false; if (other.getSerial() != null && other.getSerial().equals(this.getSerial()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getNotBefore() == null ^ this.getNotBefore() == null) return false; if (other.getNotBefore() != null && other.getNotBefore().equals(this.getNotBefore()) == false) return false; if (other.getNotAfter() == null ^ this.getNotAfter() == null) return false; if (other.getNotAfter() != null && other.getNotAfter().equals(this.getNotAfter()) == false) return false; if (other.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; 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.getRestorableUntil() == null ^ this.getRestorableUntil() == null) return false; if (other.getRestorableUntil() != null && other.getRestorableUntil().equals(this.getRestorableUntil()) == 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.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 + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastStateChangeAt() == null) ? 0 : getLastStateChangeAt().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getSerial() == null) ? 0 : getSerial().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getNotBefore() == null) ? 0 : getNotBefore().hashCode()); hashCode = prime * hashCode + ((getNotAfter() == null) ? 0 : getNotAfter().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); hashCode = prime * hashCode + ((getCertificateAuthorityConfiguration() == null) ? 0 : getCertificateAuthorityConfiguration().hashCode()); hashCode = prime * hashCode + ((getRevocationConfiguration() == null) ? 0 : getRevocationConfiguration().hashCode()); hashCode = prime * hashCode + ((getRestorableUntil() == null) ? 0 : getRestorableUntil().hashCode()); hashCode = prime * hashCode + ((getKeyStorageSecurityStandard() == null) ? 0 : getKeyStorageSecurityStandard().hashCode()); hashCode = prime * hashCode + ((getUsageMode() == null) ? 0 : getUsageMode().hashCode()); return hashCode; } @Override public CertificateAuthority clone() { try { return (CertificateAuthority) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.acmpca.model.transform.CertificateAuthorityMarshaller.getInstance().marshall(this, protocolMarshaller); } }