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;
 
 
 public class DiskImageDescription implements SerializableCloneable {

    
The disk image format.

Constraints:
Allowed Values: VMDK, RAW, VHD

 
     private String format;

    
The size of the disk image.
 
     private Long size;

    
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
 
     private String importManifestUrl;

    
The checksum computed for the disk image.
 
     private String checksum;

    
The disk image format.

Constraints:
Allowed Values: VMDK, RAW, VHD

Returns:
The disk image format.
See also:
DiskImageFormat
 
     public String getFormat() {
         return ;
     }
    
    
The disk image format.

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
format The disk image format.
See also:
DiskImageFormat
 
     public void setFormat(String format) {
         this. = format;
     }
    
    
The disk image format.

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

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
format The disk image format.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DiskImageFormat
 
     public DiskImageDescription withFormat(String format) {
         this. = format;
         return this;
     }

    
The disk image format.

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
format The disk image format.
See also:
DiskImageFormat
    public void setFormat(DiskImageFormat format) {
        this. = format.toString();
    }
    
    
The disk image format.

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

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
format The disk image format.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DiskImageFormat
        this. = format.toString();
        return this;
    }

    
The size of the disk image.

Returns:
The size of the disk image.
    public Long getSize() {
        return ;
    }
    
    
The size of the disk image.

Parameters:
size The size of the disk image.
    public void setSize(Long size) {
        this. = size;
    }
    
    
The size of the disk image.

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

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

    
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.

Returns:
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
    public String getImportManifestUrl() {
        return ;
    }
    
    
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.

Parameters:
importManifestUrl A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
    public void setImportManifestUrl(String importManifestUrl) {
        this. = importManifestUrl;
    }
    
    
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.

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

Parameters:
importManifestUrl A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DiskImageDescription withImportManifestUrl(String importManifestUrl) {
        this. = importManifestUrl;
        return this;
    }

    
The checksum computed for the disk image.

Returns:
The checksum computed for the disk image.
    public String getChecksum() {
        return ;
    }
    
    
The checksum computed for the disk image.

Parameters:
checksum The checksum computed for the disk image.
    public void setChecksum(String checksum) {
        this. = checksum;
    }
    
    
The checksum computed for the disk image.

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

Parameters:
checksum The checksum computed for the disk image.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DiskImageDescription withChecksum(String checksum) {
        this. = checksum;
        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 (getFormat() != nullsb.append("Format: " + getFormat() + ",");
        if (getSize() != nullsb.append("Size: " + getSize() + ",");
        if (getImportManifestUrl() != nullsb.append("ImportManifestUrl: " + getImportManifestUrl() + ",");
        if (getChecksum() != nullsb.append("Checksum: " + getChecksum() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); 
        hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); 
        hashCode = prime * hashCode + ((getImportManifestUrl() == null) ? 0 : getImportManifestUrl().hashCode()); 
        hashCode = prime * hashCode + ((getChecksum() == null) ? 0 : getChecksum().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DiskImageDescription == falsereturn false;
        DiskImageDescription other = (DiskImageDescription)obj;
        
        if (other.getFormat() == null ^ this.getFormat() == nullreturn false;
        if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == falsereturn false
        if (other.getSize() == null ^ this.getSize() == nullreturn false;
        if (other.getSize() != null && other.getSize().equals(this.getSize()) == falsereturn false
        if (other.getImportManifestUrl() == null ^ this.getImportManifestUrl() == nullreturn false;
        if (other.getImportManifestUrl() != null && other.getImportManifestUrl().equals(this.getImportManifestUrl()) == falsereturn false
        if (other.getChecksum() == null ^ this.getChecksum() == nullreturn false;
        if (other.getChecksum() != null && other.getChecksum().equals(this.getChecksum()) == falsereturn false
        return true;
    }
    
    @Override
    public DiskImageDescription clone() {
        try {
            return (DiskImageDescriptionsuper.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