Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.rds.model;
 

A CA certificate for an AWS account.

 
 public class Certificate implements SerializableCloneable {

    
The unique key that identifies a certificate.
 
     private String certificateIdentifier;

    
The type of the certificate.
 
     private String certificateType;

    
The thumbprint of the certificate.
 
     private String thumbprint;

    
The starting date from which the certificate is valid.
 
     private java.util.Date validFrom;

    
The final date that the certificate continues to be valid.
 
     private java.util.Date validTill;

    
The unique key that identifies a certificate.

Returns:
The unique key that identifies a certificate.
 
     public String getCertificateIdentifier() {
         return ;
     }
    
    
The unique key that identifies a certificate.

Parameters:
certificateIdentifier The unique key that identifies a certificate.
 
     public void setCertificateIdentifier(String certificateIdentifier) {
         this. = certificateIdentifier;
     }
    
    
The unique key that identifies a certificate.

Returns a reference to this object so that method calls can be chained together.

Parameters:
certificateIdentifier The unique key that identifies a certificate.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Certificate withCertificateIdentifier(String certificateIdentifier) {
         this. = certificateIdentifier;
         return this;
     }

    
The type of the certificate.

Returns:
The type of the certificate.
 
     public String getCertificateType() {
         return ;
     }
    
    
The type of the certificate.

Parameters:
certificateType The type of the certificate.
 
     public void setCertificateType(String certificateType) {
         this. = certificateType;
    }
    
    
The type of the certificate.

Returns a reference to this object so that method calls can be chained together.

Parameters:
certificateType The type of the certificate.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Certificate withCertificateType(String certificateType) {
        this. = certificateType;
        return this;
    }

    
The thumbprint of the certificate.

Returns:
The thumbprint of the certificate.
    public String getThumbprint() {
        return ;
    }
    
    
The thumbprint of the certificate.

Parameters:
thumbprint The thumbprint of the certificate.
    public void setThumbprint(String thumbprint) {
        this. = thumbprint;
    }
    
    
The thumbprint of the certificate.

Returns a reference to this object so that method calls can be chained together.

Parameters:
thumbprint The thumbprint of the certificate.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Certificate withThumbprint(String thumbprint) {
        this. = thumbprint;
        return this;
    }

    
The starting date from which the certificate is valid.

Returns:
The starting date from which the certificate is valid.
    public java.util.Date getValidFrom() {
        return ;
    }
    
    
The starting date from which the certificate is valid.

Parameters:
validFrom The starting date from which the certificate is valid.
    public void setValidFrom(java.util.Date validFrom) {
        this. = validFrom;
    }
    
    
The starting date from which the certificate is valid.

Returns a reference to this object so that method calls can be chained together.

Parameters:
validFrom The starting date from which the certificate is valid.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Certificate withValidFrom(java.util.Date validFrom) {
        this. = validFrom;
        return this;
    }

    
The final date that the certificate continues to be valid.

Returns:
The final date that the certificate continues to be valid.
    public java.util.Date getValidTill() {
        return ;
    }
    
    
The final date that the certificate continues to be valid.

Parameters:
validTill The final date that the certificate continues to be valid.
    public void setValidTill(java.util.Date validTill) {
        this. = validTill;
    }
    
    
The final date that the certificate continues to be valid.

Returns a reference to this object so that method calls can be chained together.

Parameters:
validTill The final date that the certificate continues to be valid.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Certificate withValidTill(java.util.Date validTill) {
        this. = validTill;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getCertificateIdentifier() != nullsb.append("CertificateIdentifier: " + getCertificateIdentifier() + ",");
        if (getCertificateType() != nullsb.append("CertificateType: " + getCertificateType() + ",");
        if (getThumbprint() != nullsb.append("Thumbprint: " + getThumbprint() + ",");
        if (getValidFrom() != nullsb.append("ValidFrom: " + getValidFrom() + ",");
        if (getValidTill() != nullsb.append("ValidTill: " + getValidTill() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCertificateIdentifier() == null) ? 0 : getCertificateIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getCertificateType() == null) ? 0 : getCertificateType().hashCode()); 
        hashCode = prime * hashCode + ((getThumbprint() == null) ? 0 : getThumbprint().hashCode()); 
        hashCode = prime * hashCode + ((getValidFrom() == null) ? 0 : getValidFrom().hashCode()); 
        hashCode = prime * hashCode + ((getValidTill() == null) ? 0 : getValidTill().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Certificate == falsereturn false;
        Certificate other = (Certificate)obj;
        
        if (other.getCertificateIdentifier() == null ^ this.getCertificateIdentifier() == nullreturn false;
        if (other.getCertificateIdentifier() != null && other.getCertificateIdentifier().equals(this.getCertificateIdentifier()) == falsereturn false
        if (other.getCertificateType() == null ^ this.getCertificateType() == nullreturn false;
        if (other.getCertificateType() != null && other.getCertificateType().equals(this.getCertificateType()) == falsereturn false
        if (other.getThumbprint() == null ^ this.getThumbprint() == nullreturn false;
        if (other.getThumbprint() != null && other.getThumbprint().equals(this.getThumbprint()) == falsereturn false
        if (other.getValidFrom() == null ^ this.getValidFrom() == nullreturn false;
        if (other.getValidFrom() != null && other.getValidFrom().equals(this.getValidFrom()) == falsereturn false
        if (other.getValidTill() == null ^ this.getValidTill() == nullreturn false;
        if (other.getValidTill() != null && other.getValidTill().equals(this.getValidTill()) == falsereturn false
        return true;
    }
    
    @Override
    public Certificate clone() {
        try {
            return (Certificatesuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X