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

Client-specific data.

 
 public class ClientData implements SerializableCloneable {

    
The time that the disk upload starts.
 
     private java.util.Date uploadStart;

    
The time that the disk upload ends.
 
     private java.util.Date uploadEnd;

    
The size of the uploaded disk image.
 
     private Double uploadSize;

    
User-defined comment about the upload.
 
     private String comment;

    
The time that the disk upload starts.

Returns:
The time that the disk upload starts.
 
     public java.util.Date getUploadStart() {
         return ;
     }
    
    
The time that the disk upload starts.

Parameters:
uploadStart The time that the disk upload starts.
 
     public void setUploadStart(java.util.Date uploadStart) {
         this. = uploadStart;
     }
    
    
The time that the disk upload starts.

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

Parameters:
uploadStart The time that the disk upload starts.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ClientData withUploadStart(java.util.Date uploadStart) {
         this. = uploadStart;
         return this;
     }

    
The time that the disk upload ends.

Returns:
The time that the disk upload ends.
 
     public java.util.Date getUploadEnd() {
         return ;
     }
    
    
The time that the disk upload ends.

Parameters:
uploadEnd The time that the disk upload ends.
 
     public void setUploadEnd(java.util.Date uploadEnd) {
         this. = uploadEnd;
     }
    
    
The time that the disk upload ends.

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

Parameters:
uploadEnd The time that the disk upload ends.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ClientData withUploadEnd(java.util.Date uploadEnd) {
        this. = uploadEnd;
        return this;
    }

    
The size of the uploaded disk image.

Returns:
The size of the uploaded disk image.
    public Double getUploadSize() {
        return ;
    }
    
    
The size of the uploaded disk image.

Parameters:
uploadSize The size of the uploaded disk image.
    public void setUploadSize(Double uploadSize) {
        this. = uploadSize;
    }
    
    
The size of the uploaded disk image.

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

Parameters:
uploadSize The size of the uploaded disk image.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ClientData withUploadSize(Double uploadSize) {
        this. = uploadSize;
        return this;
    }

    
User-defined comment about the upload.

Returns:
User-defined comment about the upload.
    public String getComment() {
        return ;
    }
    
    
User-defined comment about the upload.

Parameters:
comment User-defined comment about the upload.
    public void setComment(String comment) {
        this. = comment;
    }
    
    
User-defined comment about the upload.

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

Parameters:
comment User-defined comment about the upload.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ClientData withComment(String comment) {
        this. = comment;
        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 (getUploadStart() != nullsb.append("UploadStart: " + getUploadStart() + ",");
        if (getUploadEnd() != nullsb.append("UploadEnd: " + getUploadEnd() + ",");
        if (getUploadSize() != nullsb.append("UploadSize: " + getUploadSize() + ",");
        if (getComment() != nullsb.append("Comment: " + getComment() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getUploadStart() == null) ? 0 : getUploadStart().hashCode()); 
        hashCode = prime * hashCode + ((getUploadEnd() == null) ? 0 : getUploadEnd().hashCode()); 
        hashCode = prime * hashCode + ((getUploadSize() == null) ? 0 : getUploadSize().hashCode()); 
        hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ClientData == falsereturn false;
        ClientData other = (ClientData)obj;
        
        if (other.getUploadStart() == null ^ this.getUploadStart() == nullreturn false;
        if (other.getUploadStart() != null && other.getUploadStart().equals(this.getUploadStart()) == falsereturn false
        if (other.getUploadEnd() == null ^ this.getUploadEnd() == nullreturn false;
        if (other.getUploadEnd() != null && other.getUploadEnd().equals(this.getUploadEnd()) == falsereturn false
        if (other.getUploadSize() == null ^ this.getUploadSize() == nullreturn false;
        if (other.getUploadSize() != null && other.getUploadSize().equals(this.getUploadSize()) == falsereturn false
        if (other.getComment() == null ^ this.getComment() == nullreturn false;
        if (other.getComment() != null && other.getComment().equals(this.getComment()) == falsereturn false
        return true;
    }
    
    @Override
    public ClientData clone() {
        try {
            return (ClientDatasuper.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