com.amazonaws.services.apigateway.model.GenerateClientCertificateResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-api-gateway Show documentation
/*
 * Copyright 2010-2016 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;
/**
 * 
 * Represents a Client Certificate used to configure client-side SSL
 * authentication while sending requests to the integration endpoint.
 * 
 */
public class GenerateClientCertificateResult 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, that can be used to
     * configure certificate authentication in the integration endpoint .
     * 
     */
    private String pemEncodedCertificate;
    /**
     * 
     * The date when the Client Certificate was created, in ISO 8601 format.
     * 
     */
    private java.util.Date createdDate;
    /**
     * 
     * The date when the Client Certificate will expire, in ISO 8601 format.
     * 
     */
    private java.util.Date expirationDate;
    /**
     * 
     * 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, that can be used to
     * configure certificate authentication in the integration endpoint .
     * 
     * 
     * @param pemEncodedCertificate
     *        The PEM-encoded public key of the Client Certificate, that 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, that can be used to
     * configure certificate authentication in the integration endpoint .
     * 
     * 
     * @return The PEM-encoded public key of the Client Certificate, that 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, that can be used to
     * configure certificate authentication in the integration endpoint .
     * 
     * 
     * @param pemEncodedCertificate
     *        The PEM-encoded public key of the Client Certificate, that 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 date when the Client Certificate was created, in ISO 8601 format.
     * 
     * 
     * @param createdDate
     *        The date when the Client Certificate was created, in ISO 8601 format.
     */
    public void setCreatedDate(java.util.Date createdDate) {
        this.createdDate = createdDate;
    }
    /**
     * 
     * The date when the Client Certificate was created, in ISO 8601 format.
     * 
     * 
     * @return The date when the Client Certificate was created, in ISO 8601 format.
     */
    public java.util.Date getCreatedDate() {
        return this.createdDate;
    }
    /**
     * 
     * The date when the Client Certificate was created, in ISO 8601 format.
     * 
     * 
     * @param createdDate
     *        The date when the Client Certificate was created, in ISO 8601 format.
     * @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 date when the Client Certificate will expire, in ISO 8601 format.
     * 
     * 
     * @param expirationDate
     *        The date when the Client Certificate will expire, in ISO 8601 format.
     */
    public void setExpirationDate(java.util.Date expirationDate) {
        this.expirationDate = expirationDate;
    }
    /**
     * 
     * The date when the Client Certificate will expire, in ISO 8601 format.
     * 
     * 
     * @return The date when the Client Certificate will expire, in ISO 8601 format.
     */
    public java.util.Date getExpirationDate() {
        return this.expirationDate;
    }
    /**
     * 
     * The date when the Client Certificate will expire, in ISO 8601 format.
     * 
     * 
     * @param expirationDate
     *        The date when the Client Certificate will expire, in ISO 8601 format.
     * @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;
    }
    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @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: " + getClientCertificateId() + ",");
        if (getDescription() != null)
            sb.append("Description: " + getDescription() + ",");
        if (getPemEncodedCertificate() != null)
            sb.append("PemEncodedCertificate: " + getPemEncodedCertificate()
                    + ",");
        if (getCreatedDate() != null)
            sb.append("CreatedDate: " + getCreatedDate() + ",");
        if (getExpirationDate() != null)
            sb.append("ExpirationDate: " + getExpirationDate());
        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;
        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());
        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);
        }
    }
}