/* * 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.apigateway.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* Represents a client certificate used to configure client-side SSL authentication while sending requests to the * integration endpoint. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GenerateClientCertificateResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The identifier of the client certificate. *

*/ private String clientCertificateId; /** *

* The description of the client certificate. *

*/ private String description; /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication * in the integration endpoint . *

*/ private String pemEncodedCertificate; /** *

* The timestamp when the client certificate was created. *

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

* The timestamp when the client certificate will expire. *

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

* The collection of tags. Each tag element is associated with a given resource. *

*/ private java.util.Map tags; /** *

* The identifier of the client certificate. *

* * @param clientCertificateId * The identifier of the client certificate. */ public void setClientCertificateId(String clientCertificateId) { this.clientCertificateId = clientCertificateId; } /** *

* The identifier of the client certificate. *

* * @return The identifier of the client certificate. */ public String getClientCertificateId() { return this.clientCertificateId; } /** *

* The identifier of the client certificate. *

* * @param clientCertificateId * The identifier of the client certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withClientCertificateId(String clientCertificateId) { setClientCertificateId(clientCertificateId); return this; } /** *

* The description of the client certificate. *

* * @param description * The description of the client certificate. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the client certificate. *

* * @return The description of the client certificate. */ public String getDescription() { return this.description; } /** *

* The description of the client certificate. *

* * @param description * The description of the client certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withDescription(String description) { setDescription(description); return this; } /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication * in the integration endpoint . *

* * @param pemEncodedCertificate * The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . */ public void setPemEncodedCertificate(String pemEncodedCertificate) { this.pemEncodedCertificate = pemEncodedCertificate; } /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication * in the integration endpoint . *

* * @return The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . */ public String getPemEncodedCertificate() { return this.pemEncodedCertificate; } /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication * in the integration endpoint . *

* * @param pemEncodedCertificate * The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withPemEncodedCertificate(String pemEncodedCertificate) { setPemEncodedCertificate(pemEncodedCertificate); return this; } /** *

* The timestamp when the client certificate was created. *

* * @param createdDate * The timestamp when the client certificate was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** *

* The timestamp when the client certificate was created. *

* * @return The timestamp when the client certificate was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** *

* The timestamp when the client certificate was created. *

* * @param createdDate * The timestamp when the client certificate was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** *

* The timestamp when the client certificate will expire. *

* * @param expirationDate * The timestamp when the client certificate will expire. */ public void setExpirationDate(java.util.Date expirationDate) { this.expirationDate = expirationDate; } /** *

* The timestamp when the client certificate will expire. *

* * @return The timestamp when the client certificate will expire. */ public java.util.Date getExpirationDate() { return this.expirationDate; } /** *

* The timestamp when the client certificate will expire. *

* * @param expirationDate * The timestamp when the client certificate will expire. * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withExpirationDate(java.util.Date expirationDate) { setExpirationDate(expirationDate); return this; } /** *

* The collection of tags. Each tag element is associated with a given resource. *

* * @return The collection of tags. Each tag element is associated with a given resource. */ public java.util.Map getTags() { return tags; } /** *

* The collection of tags. Each tag element is associated with a given resource. *

* * @param tags * The collection of tags. Each tag element is associated with a given resource. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The collection of tags. Each tag element is associated with a given resource. *

* * @param tags * The collection of tags. Each tag element is associated with a given resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see GenerateClientCertificateResult#withTags * @returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public GenerateClientCertificateResult clearTagsEntries() { this.tags = null; 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 (getClientCertificateId() != null) sb.append("ClientCertificateId: ").append(getClientCertificateId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getPemEncodedCertificate() != null) sb.append("PemEncodedCertificate: ").append(getPemEncodedCertificate()).append(","); if (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()).append(","); if (getExpirationDate() != null) sb.append("ExpirationDate: ").append(getExpirationDate()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GenerateClientCertificateResult == false) return false; GenerateClientCertificateResult other = (GenerateClientCertificateResult) obj; if (other.getClientCertificateId() == null ^ this.getClientCertificateId() == null) return false; if (other.getClientCertificateId() != null && other.getClientCertificateId().equals(this.getClientCertificateId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getPemEncodedCertificate() == null ^ this.getPemEncodedCertificate() == null) return false; if (other.getPemEncodedCertificate() != null && other.getPemEncodedCertificate().equals(this.getPemEncodedCertificate()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getExpirationDate() == null ^ this.getExpirationDate() == null) return false; if (other.getExpirationDate() != null && other.getExpirationDate().equals(this.getExpirationDate()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientCertificateId() == null) ? 0 : getClientCertificateId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getPemEncodedCertificate() == null) ? 0 : getPemEncodedCertificate().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getExpirationDate() == null) ? 0 : getExpirationDate().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public GenerateClientCertificateResult clone() { try { return (GenerateClientCertificateResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }