/* * 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 UpdateCertificateAuthorityRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form: *

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

*/ private String certificateAuthorityArn; /** *

* Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate * revocation list (CRL), to enable both, or to enable neither. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration * and CrlConfiguration * types. *

* *

* The following requirements apply to revocation configurations. *

* *
*/ private RevocationConfiguration revocationConfiguration; /** *

* Status of your private CA. *

*/ private String status; /** *

* Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form: *

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

* * @param certificateAuthorityArn * Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of * the form:

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 */ public void setCertificateAuthorityArn(String certificateAuthorityArn) { this.certificateAuthorityArn = certificateAuthorityArn; } /** *

* Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form: *

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

* * @return Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of * the form:

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 */ public String getCertificateAuthorityArn() { return this.certificateAuthorityArn; } /** *

* Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form: *

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 *

* * @param certificateAuthorityArn * Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of * the form:

*

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateAuthorityRequest withCertificateAuthorityArn(String certificateAuthorityArn) { setCertificateAuthorityArn(certificateAuthorityArn); 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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration * and CrlConfiguration * types. *

* *

* The following requirements apply to revocation configurations. *

* *
* * @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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration and CrlConfiguration types.

*

* The following requirements apply to revocation configurations. *

* */ 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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration * and CrlConfiguration * types. *

* *

* The following requirements apply to revocation configurations. *

* *
* * @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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration and CrlConfiguration types.

*

* The following requirements apply to revocation configurations. *

* */ 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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration * and CrlConfiguration * types. *

* *

* 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://". *

    *
  • *
*
* * @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. If this parameter is not supplied, existing * capibilites remain unchanged. For more information, see the OcspConfiguration and CrlConfiguration types.

*

* 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://". *

    *
  • *
* @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateAuthorityRequest withRevocationConfiguration(RevocationConfiguration revocationConfiguration) { setRevocationConfiguration(revocationConfiguration); 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 UpdateCertificateAuthorityRequest 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 UpdateCertificateAuthorityRequest withStatus(CertificateAuthorityStatus status) { this.status = status.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 (getCertificateAuthorityArn() != null) sb.append("CertificateAuthorityArn: ").append(getCertificateAuthorityArn()).append(","); if (getRevocationConfiguration() != null) sb.append("RevocationConfiguration: ").append(getRevocationConfiguration()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateCertificateAuthorityRequest == false) return false; UpdateCertificateAuthorityRequest other = (UpdateCertificateAuthorityRequest) obj; if (other.getCertificateAuthorityArn() == null ^ this.getCertificateAuthorityArn() == null) return false; if (other.getCertificateAuthorityArn() != null && other.getCertificateAuthorityArn().equals(this.getCertificateAuthorityArn()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificateAuthorityArn() == null) ? 0 : getCertificateAuthorityArn().hashCode()); hashCode = prime * hashCode + ((getRevocationConfiguration() == null) ? 0 : getRevocationConfiguration().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public UpdateCertificateAuthorityRequest clone() { return (UpdateCertificateAuthorityRequest) super.clone(); } }