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;
 

Details about the import snapshot task.

 
 public class SnapshotTaskDetail implements SerializableCloneable {

    
The size of the disk in the snapshot.
 
     private Double diskImageSize;

    
The description of the snapshot.
 
     private String description;

    
The format of the disk image from which the snapshot is created.
 
     private String format;

    
The URL of the disk image from which the snapshot is created.
 
     private String url;

    
 
     private UserBucketDetails userBucket;

    
The snapshot ID of the disk being imported.
 
     private String snapshotId;

    
The percentage of completion for the ImportSnapshot task.
 
     private String progress;

    
A detailed status message for the ImportSnapshot task.
 
     private String statusMessage;

    
A brief status for the ImportSnapshot task.
 
     private String status;

    
The size of the disk in the snapshot.

Returns:
The size of the disk in the snapshot.
 
     public Double getDiskImageSize() {
         return ;
     }
    
    
The size of the disk in the snapshot.

Parameters:
diskImageSize The size of the disk in the snapshot.
 
     public void setDiskImageSize(Double diskImageSize) {
         this. = diskImageSize;
     }
    
    
The size of the disk in the snapshot.

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

Parameters:
diskImageSize The size of the disk in the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SnapshotTaskDetail withDiskImageSize(Double diskImageSize) {
        this. = diskImageSize;
        return this;
    }

    
The description of the snapshot.

Returns:
The description of the snapshot.
    public String getDescription() {
        return ;
    }
    
    
The description of the snapshot.

Parameters:
description The description of the snapshot.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The description of the snapshot.

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

Parameters:
description The description of the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withDescription(String description) {
        this. = description;
        return this;
    }

    
The format of the disk image from which the snapshot is created.

Returns:
The format of the disk image from which the snapshot is created.
    public String getFormat() {
        return ;
    }
    
    
The format of the disk image from which the snapshot is created.

Parameters:
format The format of the disk image from which the snapshot is created.
    public void setFormat(String format) {
        this. = format;
    }
    
    
The format of the disk image from which the snapshot is created.

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

Parameters:
format The format of the disk image from which the snapshot is created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withFormat(String format) {
        this. = format;
        return this;
    }

    
The URL of the disk image from which the snapshot is created.

Returns:
The URL of the disk image from which the snapshot is created.
    public String getUrl() {
        return ;
    }
    
    
The URL of the disk image from which the snapshot is created.

Parameters:
url The URL of the disk image from which the snapshot is created.
    public void setUrl(String url) {
        this. = url;
    }
    
    
The URL of the disk image from which the snapshot is created.

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

Parameters:
url The URL of the disk image from which the snapshot is created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withUrl(String url) {
        this. = url;
        return this;
    }

    

Returns:
    public UserBucketDetails getUserBucket() {
        return ;
    }
    
    

Parameters:
userBucket
    public void setUserBucket(UserBucketDetails userBucket) {
        this. = userBucket;
    }
    
    

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

Parameters:
userBucket
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withUserBucket(UserBucketDetails userBucket) {
        this. = userBucket;
        return this;
    }

    
The snapshot ID of the disk being imported.

Returns:
The snapshot ID of the disk being imported.
    public String getSnapshotId() {
        return ;
    }
    
    
The snapshot ID of the disk being imported.

Parameters:
snapshotId The snapshot ID of the disk being imported.
    public void setSnapshotId(String snapshotId) {
        this. = snapshotId;
    }
    
    
The snapshot ID of the disk being imported.

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

Parameters:
snapshotId The snapshot ID of the disk being imported.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withSnapshotId(String snapshotId) {
        this. = snapshotId;
        return this;
    }

    
The percentage of completion for the ImportSnapshot task.

Returns:
The percentage of completion for the ImportSnapshot task.
    public String getProgress() {
        return ;
    }
    
    
The percentage of completion for the ImportSnapshot task.

Parameters:
progress The percentage of completion for the ImportSnapshot task.
    public void setProgress(String progress) {
        this. = progress;
    }
    
    
The percentage of completion for the ImportSnapshot task.

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

Parameters:
progress The percentage of completion for the ImportSnapshot task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withProgress(String progress) {
        this. = progress;
        return this;
    }

    
A detailed status message for the ImportSnapshot task.

Returns:
A detailed status message for the ImportSnapshot task.
    public String getStatusMessage() {
        return ;
    }
    
    
A detailed status message for the ImportSnapshot task.

Parameters:
statusMessage A detailed status message for the ImportSnapshot task.
    public void setStatusMessage(String statusMessage) {
        this. = statusMessage;
    }
    
    
A detailed status message for the ImportSnapshot task.

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

Parameters:
statusMessage A detailed status message for the ImportSnapshot task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withStatusMessage(String statusMessage) {
        this. = statusMessage;
        return this;
    }

    
A brief status for the ImportSnapshot task.

Returns:
A brief status for the ImportSnapshot task.
    public String getStatus() {
        return ;
    }
    
    
A brief status for the ImportSnapshot task.

Parameters:
status A brief status for the ImportSnapshot task.
    public void setStatus(String status) {
        this. = status;
    }
    
    
A brief status for the ImportSnapshot task.

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

Parameters:
status A brief status for the ImportSnapshot task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SnapshotTaskDetail withStatus(String status) {
        this. = status;
        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 (getDiskImageSize() != nullsb.append("DiskImageSize: " + getDiskImageSize() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getFormat() != nullsb.append("Format: " + getFormat() + ",");
        if (getUrl() != nullsb.append("Url: " + getUrl() + ",");
        if (getUserBucket() != nullsb.append("UserBucket: " + getUserBucket() + ",");
        if (getSnapshotId() != nullsb.append("SnapshotId: " + getSnapshotId() + ",");
        if (getProgress() != nullsb.append("Progress: " + getProgress() + ",");
        if (getStatusMessage() != nullsb.append("StatusMessage: " + getStatusMessage() + ",");
        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 + ((getDiskImageSize() == null) ? 0 : getDiskImageSize().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); 
        hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode()); 
        hashCode = prime * hashCode + ((getUserBucket() == null) ? 0 : getUserBucket().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); 
        hashCode = prime * hashCode + ((getProgress() == null) ? 0 : getProgress().hashCode()); 
        hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().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 SnapshotTaskDetail == falsereturn false;
        SnapshotTaskDetail other = (SnapshotTaskDetail)obj;
        
        if (other.getDiskImageSize() == null ^ this.getDiskImageSize() == nullreturn false;
        if (other.getDiskImageSize() != null && other.getDiskImageSize().equals(this.getDiskImageSize()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getFormat() == null ^ this.getFormat() == nullreturn false;
        if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == falsereturn false
        if (other.getUrl() == null ^ this.getUrl() == nullreturn false;
        if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == falsereturn false
        if (other.getUserBucket() == null ^ this.getUserBucket() == nullreturn false;
        if (other.getUserBucket() != null && other.getUserBucket().equals(this.getUserBucket()) == falsereturn false
        if (other.getSnapshotId() == null ^ this.getSnapshotId() == nullreturn false;
        if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == falsereturn false
        if (other.getProgress() == null ^ this.getProgress() == nullreturn false;
        if (other.getProgress() != null && other.getProgress().equals(this.getProgress()) == falsereturn false
        if (other.getStatusMessage() == null ^ this.getStatusMessage() == nullreturn false;
        if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == 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 SnapshotTaskDetail clone() {
        try {
            return (SnapshotTaskDetailsuper.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