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;
 

Describes an import volume task.

 
 public class ImportVolumeTaskDetails implements SerializableCloneable {

    
The number of bytes converted so far.
 
     private Long bytesConverted;

    
The Availability Zone where the resulting volume will reside.
 
     private String availabilityZone;

    
The description you provided when starting the import volume task.
 
     private String description;

    
The image.
 
     private DiskImageDescription image;

    
The volume.
 
     private DiskImageVolumeDescription volume;

    
The number of bytes converted so far.

Returns:
The number of bytes converted so far.
 
     public Long getBytesConverted() {
         return ;
     }
    
    
The number of bytes converted so far.

Parameters:
bytesConverted The number of bytes converted so far.
 
     public void setBytesConverted(Long bytesConverted) {
         this. = bytesConverted;
     }
    
    
The number of bytes converted so far.

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

Parameters:
bytesConverted The number of bytes converted so far.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ImportVolumeTaskDetails withBytesConverted(Long bytesConverted) {
         this. = bytesConverted;
         return this;
     }

    
The Availability Zone where the resulting volume will reside.

Returns:
The Availability Zone where the resulting volume will reside.
 
     public String getAvailabilityZone() {
         return ;
     }
    
    
The Availability Zone where the resulting volume will reside.

Parameters:
availabilityZone The Availability Zone where the resulting volume will reside.
 
     public void setAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
    }
    
    
The Availability Zone where the resulting volume will reside.

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

Parameters:
availabilityZone The Availability Zone where the resulting volume will reside.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportVolumeTaskDetails withAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
        return this;
    }

    
The description you provided when starting the import volume task.

Returns:
The description you provided when starting the import volume task.
    public String getDescription() {
        return ;
    }
    
    
The description you provided when starting the import volume task.

Parameters:
description The description you provided when starting the import volume task.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The description you provided when starting the import volume task.

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

Parameters:
description The description you provided when starting the import volume task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportVolumeTaskDetails withDescription(String description) {
        this. = description;
        return this;
    }

    
The image.

Returns:
The image.
    public DiskImageDescription getImage() {
        return ;
    }
    
    
The image.

Parameters:
image The image.
    public void setImage(DiskImageDescription image) {
        this. = image;
    }
    
    
The image.

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

Parameters:
image The image.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = image;
        return this;
    }

    
The volume.

Returns:
The volume.
        return ;
    }
    
    
The volume.

Parameters:
volume The volume.
    public void setVolume(DiskImageVolumeDescription volume) {
        this. = volume;
    }
    
    
The volume.

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

Parameters:
volume The volume.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = volume;
        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 (getBytesConverted() != nullsb.append("BytesConverted: " + getBytesConverted() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getImage() != nullsb.append("Image: " + getImage() + ",");
        if (getVolume() != nullsb.append("Volume: " + getVolume() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getBytesConverted() == null) ? 0 : getBytesConverted().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); 
        hashCode = prime * hashCode + ((getVolume() == null) ? 0 : getVolume().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ImportVolumeTaskDetails == falsereturn false;
        ImportVolumeTaskDetails other = (ImportVolumeTaskDetails)obj;
        
        if (other.getBytesConverted() == null ^ this.getBytesConverted() == nullreturn false;
        if (other.getBytesConverted() != null && other.getBytesConverted().equals(this.getBytesConverted()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getImage() == null ^ this.getImage() == nullreturn false;
        if (other.getImage() != null && other.getImage().equals(this.getImage()) == falsereturn false
        if (other.getVolume() == null ^ this.getVolume() == nullreturn false;
        if (other.getVolume() != null && other.getVolume().equals(this.getVolume()) == falsereturn false
        return true;
    }
    
    @Override
    public ImportVolumeTaskDetails clone() {
        try {
            return (ImportVolumeTaskDetailssuper.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