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.simplesystemsmanagement.model;
 

Describes a configuration document.

 
 public class DocumentDescription implements SerializableCloneable {

    
The SHA1 hash of the document, which you can use for verification purposes.
 
     private String sha1;

    
The name of the configuration document.

Constraints:
Length: 3 - 64
Pattern: ^[a-zA-Z0-9_\-.]{3,64}$

 
     private String name;

    
The date when the configuration document was created.
 
     private java.util.Date createdDate;

    
The status of the configuration document.

Constraints:
Allowed Values: Creating, Active, Deleting

 
     private String status;

    
The SHA1 hash of the document, which you can use for verification purposes.

Returns:
The SHA1 hash of the document, which you can use for verification purposes.
 
     public String getSha1() {
         return ;
     }
    
    
The SHA1 hash of the document, which you can use for verification purposes.

Parameters:
sha1 The SHA1 hash of the document, which you can use for verification purposes.
 
     public void setSha1(String sha1) {
         this. = sha1;
     }
    
    
The SHA1 hash of the document, which you can use for verification purposes.

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

Parameters:
sha1 The SHA1 hash of the document, which you can use for verification purposes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DocumentDescription withSha1(String sha1) {
         this. = sha1;
         return this;
     }

    
The name of the configuration document.

Constraints:
Length: 3 - 64
Pattern: ^[a-zA-Z0-9_\-.]{3,64}$

Returns:
The name of the configuration document.
    public String getName() {
        return ;
    }
    
    
The name of the configuration document.

Constraints:
Length: 3 - 64
Pattern: ^[a-zA-Z0-9_\-.]{3,64}$

Parameters:
name The name of the configuration document.
    public void setName(String name) {
        this. = name;
    }
    
    
The name of the configuration document.

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

Constraints:
Length: 3 - 64
Pattern: ^[a-zA-Z0-9_\-.]{3,64}$

Parameters:
name The name of the configuration document.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DocumentDescription withName(String name) {
        this. = name;
        return this;
    }

    
The date when the configuration document was created.

Returns:
The date when the configuration document was created.
    public java.util.Date getCreatedDate() {
        return ;
    }
    
    
The date when the configuration document was created.

Parameters:
createdDate The date when the configuration document was created.
    public void setCreatedDate(java.util.Date createdDate) {
        this. = createdDate;
    }
    
    
The date when the configuration document was created.

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

Parameters:
createdDate The date when the configuration document was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DocumentDescription withCreatedDate(java.util.Date createdDate) {
        this. = createdDate;
        return this;
    }

    
The status of the configuration document.

Constraints:
Allowed Values: Creating, Active, Deleting

Returns:
The status of the configuration document.
See also:
DocumentStatus
    public String getStatus() {
        return ;
    }
    
    
The status of the configuration document.

Constraints:
Allowed Values: Creating, Active, Deleting

Parameters:
status The status of the configuration document.
See also:
DocumentStatus
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of the configuration document.

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

Constraints:
Allowed Values: Creating, Active, Deleting

Parameters:
status The status of the configuration document.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DocumentStatus
    public DocumentDescription withStatus(String status) {
        this. = status;
        return this;
    }

    
The status of the configuration document.

Constraints:
Allowed Values: Creating, Active, Deleting

Parameters:
status The status of the configuration document.
See also:
DocumentStatus
    public void setStatus(DocumentStatus status) {
        this. = status.toString();
    }
    
    
The status of the configuration document.

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

Constraints:
Allowed Values: Creating, Active, Deleting

Parameters:
status The status of the configuration document.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DocumentStatus
    public DocumentDescription withStatus(DocumentStatus status) {
        this. = status.toString();
        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 (getSha1() != nullsb.append("Sha1: " + getSha1() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getCreatedDate() != nullsb.append("CreatedDate: " + getCreatedDate() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSha1() == null) ? 0 : getSha1().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DocumentDescription == falsereturn false;
        DocumentDescription other = (DocumentDescription)obj;
        
        if (other.getSha1() == null ^ this.getSha1() == nullreturn false;
        if (other.getSha1() != null && other.getSha1().equals(this.getSha1()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getCreatedDate() == null ^ this.getCreatedDate() == nullreturn false;
        if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public DocumentDescription clone() {
        try {
            return (DocumentDescriptionsuper.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