/* * 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.transfer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes the properties of a certificate. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribedCertificate implements Serializable, Cloneable, StructuredPojo { /** ** The unique Amazon Resource Name (ARN) for the certificate. *
*/ private String arn; /** ** An array of identifiers for the imported certificates. You use this identifier for working with profiles and * partner profiles. *
*/ private String certificateId; /** ** Specifies whether this certificate is used for signing or encryption. *
*/ private String usage; /** *
* The certificate can be either ACTIVE
, PENDING_ROTATION
, or INACTIVE
.
* PENDING_ROTATION
means that this certificate will replace the current certificate when it expires.
*
* The file name for the certificate. *
*/ private String certificate; /** ** The list of certificates that make up the chain for the certificate. *
*/ private String certificateChain; /** ** An optional date that specifies when the certificate becomes active. *
*/ private java.util.Date activeDate; /** ** An optional date that specifies when the certificate becomes inactive. *
*/ private java.util.Date inactiveDate; /** ** The serial number for the certificate. *
*/ private String serial; /** ** The earliest date that the certificate is valid. *
*/ private java.util.Date notBeforeDate; /** ** The final date that the certificate is valid. *
*/ private java.util.Date notAfterDate; /** *
* If a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY
.
* If there is no private key, the type is CERTIFICATE
.
*
* The name or description that's used to identity the certificate. *
*/ private String description; /** ** Key-value pairs that can be used to group and search for certificates. *
*/ private java.util.List* The unique Amazon Resource Name (ARN) for the certificate. *
* * @param arn * The unique Amazon Resource Name (ARN) for the certificate. */ public void setArn(String arn) { this.arn = arn; } /** ** The unique Amazon Resource Name (ARN) for the certificate. *
* * @return The unique Amazon Resource Name (ARN) for the certificate. */ public String getArn() { return this.arn; } /** ** The unique Amazon Resource Name (ARN) for the certificate. *
* * @param arn * The unique Amazon Resource Name (ARN) for the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withArn(String arn) { setArn(arn); return this; } /** ** An array of identifiers for the imported certificates. You use this identifier for working with profiles and * partner profiles. *
* * @param certificateId * An array of identifiers for the imported certificates. You use this identifier for working with profiles * and partner profiles. */ public void setCertificateId(String certificateId) { this.certificateId = certificateId; } /** ** An array of identifiers for the imported certificates. You use this identifier for working with profiles and * partner profiles. *
* * @return An array of identifiers for the imported certificates. You use this identifier for working with profiles * and partner profiles. */ public String getCertificateId() { return this.certificateId; } /** ** An array of identifiers for the imported certificates. You use this identifier for working with profiles and * partner profiles. *
* * @param certificateId * An array of identifiers for the imported certificates. You use this identifier for working with profiles * and partner profiles. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withCertificateId(String certificateId) { setCertificateId(certificateId); return this; } /** ** Specifies whether this certificate is used for signing or encryption. *
* * @param usage * Specifies whether this certificate is used for signing or encryption. * @see CertificateUsageType */ public void setUsage(String usage) { this.usage = usage; } /** ** Specifies whether this certificate is used for signing or encryption. *
* * @return Specifies whether this certificate is used for signing or encryption. * @see CertificateUsageType */ public String getUsage() { return this.usage; } /** ** Specifies whether this certificate is used for signing or encryption. *
* * @param usage * Specifies whether this certificate is used for signing or encryption. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateUsageType */ public DescribedCertificate withUsage(String usage) { setUsage(usage); return this; } /** ** Specifies whether this certificate is used for signing or encryption. *
* * @param usage * Specifies whether this certificate is used for signing or encryption. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateUsageType */ public DescribedCertificate withUsage(CertificateUsageType usage) { this.usage = usage.toString(); return this; } /** *
* The certificate can be either ACTIVE
, PENDING_ROTATION
, or INACTIVE
.
* PENDING_ROTATION
means that this certificate will replace the current certificate when it expires.
*
ACTIVE
, PENDING_ROTATION
, or INACTIVE
* . PENDING_ROTATION
means that this certificate will replace the current certificate when it
* expires.
* @see CertificateStatusType
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The certificate can be either ACTIVE
, PENDING_ROTATION
, or INACTIVE
.
* PENDING_ROTATION
means that this certificate will replace the current certificate when it expires.
*
ACTIVE
, PENDING_ROTATION
, or
* INACTIVE
. PENDING_ROTATION
means that this certificate will replace the current
* certificate when it expires.
* @see CertificateStatusType
*/
public String getStatus() {
return this.status;
}
/**
*
* The certificate can be either ACTIVE
, PENDING_ROTATION
, or INACTIVE
.
* PENDING_ROTATION
means that this certificate will replace the current certificate when it expires.
*
ACTIVE
, PENDING_ROTATION
, or INACTIVE
* . PENDING_ROTATION
means that this certificate will replace the current certificate when it
* expires.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateStatusType
*/
public DescribedCertificate withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The certificate can be either ACTIVE
, PENDING_ROTATION
, or INACTIVE
.
* PENDING_ROTATION
means that this certificate will replace the current certificate when it expires.
*
ACTIVE
, PENDING_ROTATION
, or INACTIVE
* . PENDING_ROTATION
means that this certificate will replace the current certificate when it
* expires.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateStatusType
*/
public DescribedCertificate withStatus(CertificateStatusType status) {
this.status = status.toString();
return this;
}
/**
* * The file name for the certificate. *
* * @param certificate * The file name for the certificate. */ public void setCertificate(String certificate) { this.certificate = certificate; } /** ** The file name for the certificate. *
* * @return The file name for the certificate. */ public String getCertificate() { return this.certificate; } /** ** The file name for the certificate. *
* * @param certificate * The file name for the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withCertificate(String certificate) { setCertificate(certificate); return this; } /** ** The list of certificates that make up the chain for the certificate. *
* * @param certificateChain * The list of certificates that make up the chain for the certificate. */ public void setCertificateChain(String certificateChain) { this.certificateChain = certificateChain; } /** ** The list of certificates that make up the chain for the certificate. *
* * @return The list of certificates that make up the chain for the certificate. */ public String getCertificateChain() { return this.certificateChain; } /** ** The list of certificates that make up the chain for the certificate. *
* * @param certificateChain * The list of certificates that make up the chain for the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withCertificateChain(String certificateChain) { setCertificateChain(certificateChain); return this; } /** ** An optional date that specifies when the certificate becomes active. *
* * @param activeDate * An optional date that specifies when the certificate becomes active. */ public void setActiveDate(java.util.Date activeDate) { this.activeDate = activeDate; } /** ** An optional date that specifies when the certificate becomes active. *
* * @return An optional date that specifies when the certificate becomes active. */ public java.util.Date getActiveDate() { return this.activeDate; } /** ** An optional date that specifies when the certificate becomes active. *
* * @param activeDate * An optional date that specifies when the certificate becomes active. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withActiveDate(java.util.Date activeDate) { setActiveDate(activeDate); return this; } /** ** An optional date that specifies when the certificate becomes inactive. *
* * @param inactiveDate * An optional date that specifies when the certificate becomes inactive. */ public void setInactiveDate(java.util.Date inactiveDate) { this.inactiveDate = inactiveDate; } /** ** An optional date that specifies when the certificate becomes inactive. *
* * @return An optional date that specifies when the certificate becomes inactive. */ public java.util.Date getInactiveDate() { return this.inactiveDate; } /** ** An optional date that specifies when the certificate becomes inactive. *
* * @param inactiveDate * An optional date that specifies when the certificate becomes inactive. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withInactiveDate(java.util.Date inactiveDate) { setInactiveDate(inactiveDate); return this; } /** ** The serial number for the certificate. *
* * @param serial * The serial number for the certificate. */ public void setSerial(String serial) { this.serial = serial; } /** ** The serial number for the certificate. *
* * @return The serial number for the certificate. */ public String getSerial() { return this.serial; } /** ** The serial number for the certificate. *
* * @param serial * The serial number for the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withSerial(String serial) { setSerial(serial); return this; } /** ** The earliest date that the certificate is valid. *
* * @param notBeforeDate * The earliest date that the certificate is valid. */ public void setNotBeforeDate(java.util.Date notBeforeDate) { this.notBeforeDate = notBeforeDate; } /** ** The earliest date that the certificate is valid. *
* * @return The earliest date that the certificate is valid. */ public java.util.Date getNotBeforeDate() { return this.notBeforeDate; } /** ** The earliest date that the certificate is valid. *
* * @param notBeforeDate * The earliest date that the certificate is valid. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withNotBeforeDate(java.util.Date notBeforeDate) { setNotBeforeDate(notBeforeDate); return this; } /** ** The final date that the certificate is valid. *
* * @param notAfterDate * The final date that the certificate is valid. */ public void setNotAfterDate(java.util.Date notAfterDate) { this.notAfterDate = notAfterDate; } /** ** The final date that the certificate is valid. *
* * @return The final date that the certificate is valid. */ public java.util.Date getNotAfterDate() { return this.notAfterDate; } /** ** The final date that the certificate is valid. *
* * @param notAfterDate * The final date that the certificate is valid. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withNotAfterDate(java.util.Date notAfterDate) { setNotAfterDate(notAfterDate); return this; } /** *
* If a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY
.
* If there is no private key, the type is CERTIFICATE
.
*
CERTIFICATE_WITH_PRIVATE_KEY
. If there is no private key, the type is
* CERTIFICATE
.
* @see CertificateType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* If a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY
.
* If there is no private key, the type is CERTIFICATE
.
*
CERTIFICATE_WITH_PRIVATE_KEY
. If there is no private key, the type is
* CERTIFICATE
.
* @see CertificateType
*/
public String getType() {
return this.type;
}
/**
*
* If a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY
.
* If there is no private key, the type is CERTIFICATE
.
*
CERTIFICATE_WITH_PRIVATE_KEY
. If there is no private key, the type is
* CERTIFICATE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateType
*/
public DescribedCertificate withType(String type) {
setType(type);
return this;
}
/**
*
* If a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY
.
* If there is no private key, the type is CERTIFICATE
.
*
CERTIFICATE_WITH_PRIVATE_KEY
. If there is no private key, the type is
* CERTIFICATE
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CertificateType
*/
public DescribedCertificate withType(CertificateType type) {
this.type = type.toString();
return this;
}
/**
* * The name or description that's used to identity the certificate. *
* * @param description * The name or description that's used to identity the certificate. */ public void setDescription(String description) { this.description = description; } /** ** The name or description that's used to identity the certificate. *
* * @return The name or description that's used to identity the certificate. */ public String getDescription() { return this.description; } /** ** The name or description that's used to identity the certificate. *
* * @param description * The name or description that's used to identity the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withDescription(String description) { setDescription(description); return this; } /** ** Key-value pairs that can be used to group and search for certificates. *
* * @return Key-value pairs that can be used to group and search for certificates. */ public java.util.List* Key-value pairs that can be used to group and search for certificates. *
* * @param tags * Key-value pairs that can be used to group and search for certificates. */ public void setTags(java.util.Collection* Key-value pairs that can be used to group and search for certificates. *
** 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 can be used to group and search for certificates. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Key-value pairs that can be used to group and search for certificates. *
* * @param tags * Key-value pairs that can be used to group and search for certificates. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribedCertificate withTags(java.util.Collection