/* * 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateCertificateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The identifier of the certificate object that you are updating. *

*/ private String certificateId; /** *

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

* A short description to help identify the certificate. *

*/ private String description; /** *

* The identifier of the certificate object that you are updating. *

* * @param certificateId * The identifier of the certificate object that you are updating. */ public void setCertificateId(String certificateId) { this.certificateId = certificateId; } /** *

* The identifier of the certificate object that you are updating. *

* * @return The identifier of the certificate object that you are updating. */ public String getCertificateId() { return this.certificateId; } /** *

* The identifier of the certificate object that you are updating. *

* * @param certificateId * The identifier of the certificate object that you are updating. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateRequest withCertificateId(String certificateId) { setCertificateId(certificateId); 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 UpdateCertificateRequest 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 UpdateCertificateRequest withInactiveDate(java.util.Date inactiveDate) { setInactiveDate(inactiveDate); return this; } /** *

* A short description to help identify the certificate. *

* * @param description * A short description to help identify the certificate. */ public void setDescription(String description) { this.description = description; } /** *

* A short description to help identify the certificate. *

* * @return A short description to help identify the certificate. */ public String getDescription() { return this.description; } /** *

* A short description to help identify the certificate. *

* * @param description * A short description to help identify the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateRequest withDescription(String description) { setDescription(description); 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 (getCertificateId() != null) sb.append("CertificateId: ").append(getCertificateId()).append(","); if (getActiveDate() != null) sb.append("ActiveDate: ").append(getActiveDate()).append(","); if (getInactiveDate() != null) sb.append("InactiveDate: ").append(getInactiveDate()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateCertificateRequest == false) return false; UpdateCertificateRequest other = (UpdateCertificateRequest) obj; if (other.getCertificateId() == null ^ this.getCertificateId() == null) return false; if (other.getCertificateId() != null && other.getCertificateId().equals(this.getCertificateId()) == false) return false; if (other.getActiveDate() == null ^ this.getActiveDate() == null) return false; if (other.getActiveDate() != null && other.getActiveDate().equals(this.getActiveDate()) == false) return false; if (other.getInactiveDate() == null ^ this.getInactiveDate() == null) return false; if (other.getInactiveDate() != null && other.getInactiveDate().equals(this.getInactiveDate()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificateId() == null) ? 0 : getCertificateId().hashCode()); hashCode = prime * hashCode + ((getActiveDate() == null) ? 0 : getActiveDate().hashCode()); hashCode = prime * hashCode + ((getInactiveDate() == null) ? 0 : getInactiveDate().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); return hashCode; } @Override public UpdateCertificateRequest clone() { return (UpdateCertificateRequest) super.clone(); } }