All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.DiskImageDetail Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

import java.io.Serializable;

/**
 * 

* Describes a disk image. *

*/ public class DiskImageDetail implements Serializable, Cloneable { /** *

* The disk image format. *

*/ private String format; /** *

* The size of the disk image, in GiB. *

*/ private Long bytes; /** *

* A presigned URL for the import manifest stored in Amazon S3 and presented * here as an Amazon S3 presigned URL. 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. *

*

* For information about the import manifest referenced by this API action, * see VM * Import Manifest. *

*/ private String importManifestUrl; /** *

* The disk image format. *

* * @param format * The disk image format. * @see DiskImageFormat */ public void setFormat(String format) { this.format = format; } /** *

* The disk image format. *

* * @return The disk image format. * @see DiskImageFormat */ public String getFormat() { return this.format; } /** *

* The disk image format. *

* * @param format * The disk image format. * @return Returns a reference to this object so that method calls can be * chained together. * @see DiskImageFormat */ public DiskImageDetail withFormat(String format) { setFormat(format); return this; } /** *

* The disk image format. *

* * @param format * The disk image format. * @see DiskImageFormat */ public void setFormat(DiskImageFormat format) { this.format = format.toString(); } /** *

* The disk image format. *

* * @param format * The disk image format. * @return Returns a reference to this object so that method calls can be * chained together. * @see DiskImageFormat */ public DiskImageDetail withFormat(DiskImageFormat format) { setFormat(format); return this; } /** *

* The size of the disk image, in GiB. *

* * @param bytes * The size of the disk image, in GiB. */ public void setBytes(Long bytes) { this.bytes = bytes; } /** *

* The size of the disk image, in GiB. *

* * @return The size of the disk image, in GiB. */ public Long getBytes() { return this.bytes; } /** *

* The size of the disk image, in GiB. *

* * @param bytes * The size of the disk image, in GiB. * @return Returns a reference to this object so that method calls can be * chained together. */ public DiskImageDetail withBytes(Long bytes) { setBytes(bytes); return this; } /** *

* A presigned URL for the import manifest stored in Amazon S3 and presented * here as an Amazon S3 presigned URL. 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. *

*

* For information about the import manifest referenced by this API action, * see VM * Import Manifest. *

* * @param importManifestUrl * A presigned URL for the import manifest stored in Amazon S3 and * presented here as an Amazon S3 presigned URL. 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.

*

* For information about the import manifest referenced by this API * action, see VM Import Manifest. */ public void setImportManifestUrl(String importManifestUrl) { this.importManifestUrl = importManifestUrl; } /** *

* A presigned URL for the import manifest stored in Amazon S3 and presented * here as an Amazon S3 presigned URL. 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. *

*

* For information about the import manifest referenced by this API action, * see VM * Import Manifest. *

* * @return A presigned URL for the import manifest stored in Amazon S3 and * presented here as an Amazon S3 presigned URL. 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.

*

* For information about the import manifest referenced by this API * action, see VM Import Manifest. */ public String getImportManifestUrl() { return this.importManifestUrl; } /** *

* A presigned URL for the import manifest stored in Amazon S3 and presented * here as an Amazon S3 presigned URL. 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. *

*

* For information about the import manifest referenced by this API action, * see VM * Import Manifest. *

* * @param importManifestUrl * A presigned URL for the import manifest stored in Amazon S3 and * presented here as an Amazon S3 presigned URL. 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.

*

* For information about the import manifest referenced by this API * action, see VM Import Manifest. * @return Returns a reference to this object so that method calls can be * chained together. */ public DiskImageDetail withImportManifestUrl(String importManifestUrl) { setImportManifestUrl(importManifestUrl); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFormat() != null) sb.append("Format: " + getFormat() + ","); if (getBytes() != null) sb.append("Bytes: " + getBytes() + ","); if (getImportManifestUrl() != null) sb.append("ImportManifestUrl: " + getImportManifestUrl()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DiskImageDetail == false) return false; DiskImageDetail other = (DiskImageDetail) obj; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getBytes() == null ^ this.getBytes() == null) return false; if (other.getBytes() != null && other.getBytes().equals(this.getBytes()) == false) return false; if (other.getImportManifestUrl() == null ^ this.getImportManifestUrl() == null) return false; if (other.getImportManifestUrl() != null && other.getImportManifestUrl().equals( this.getImportManifestUrl()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getBytes() == null) ? 0 : getBytes().hashCode()); hashCode = prime * hashCode + ((getImportManifestUrl() == null) ? 0 : getImportManifestUrl().hashCode()); return hashCode; } @Override public DiskImageDetail clone() { try { return (DiskImageDetail) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy