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 the format and location for an instance export task.

 
 public class ExportToS3Task implements SerializableCloneable {

    
The format for the exported image.

Constraints:
Allowed Values: VMDK, RAW, VHD

 
     private String diskImageFormat;

    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

Constraints:
Allowed Values: ova

 
     private String containerFormat;

    
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
 
     private String s3Bucket;

    
The encryption key for your S3 bucket.
 
     private String s3Key;

    
The format for the exported image.

Constraints:
Allowed Values: VMDK, RAW, VHD

Returns:
The format for the exported image.
See also:
DiskImageFormat
 
     public String getDiskImageFormat() {
         return ;
     }
    
    
The format for the exported image.

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat The format for the exported image.
See also:
DiskImageFormat
 
     public void setDiskImageFormat(String diskImageFormat) {
         this. = diskImageFormat;
     }
    
    
The format for the exported image.

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

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat The format for the exported image.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DiskImageFormat
 
     public ExportToS3Task withDiskImageFormat(String diskImageFormat) {
         this. = diskImageFormat;
        return this;
    }

    
The format for the exported image.

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat The format for the exported image.
See also:
DiskImageFormat
    public void setDiskImageFormat(DiskImageFormat diskImageFormat) {
        this. = diskImageFormat.toString();
    }
    
    
The format for the exported image.

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

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat The format for the exported image.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DiskImageFormat
    public ExportToS3Task withDiskImageFormat(DiskImageFormat diskImageFormat) {
        this. = diskImageFormat.toString();
        return this;
    }

    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

Constraints:
Allowed Values: ova

Returns:
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
See also:
ContainerFormat
    public String getContainerFormat() {
        return ;
    }
    
    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

Constraints:
Allowed Values: ova

Parameters:
containerFormat The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
See also:
ContainerFormat
    public void setContainerFormat(String containerFormat) {
        this. = containerFormat;
    }
    
    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

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

Constraints:
Allowed Values: ova

Parameters:
containerFormat The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ContainerFormat
    public ExportToS3Task withContainerFormat(String containerFormat) {
        this. = containerFormat;
        return this;
    }

    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

Constraints:
Allowed Values: ova

Parameters:
containerFormat The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
See also:
ContainerFormat
    public void setContainerFormat(ContainerFormat containerFormat) {
        this. = containerFormat.toString();
    }
    
    
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

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

Constraints:
Allowed Values: ova

Parameters:
containerFormat The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ContainerFormat
    public ExportToS3Task withContainerFormat(ContainerFormat containerFormat) {
        this. = containerFormat.toString();
        return this;
    }

    
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

Returns:
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
    public String getS3Bucket() {
        return ;
    }
    
    
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

Parameters:
s3Bucket The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
    public void setS3Bucket(String s3Bucket) {
        this. = s3Bucket;
    }
    
    
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

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

Parameters:
s3Bucket The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportToS3Task withS3Bucket(String s3Bucket) {
        this. = s3Bucket;
        return this;
    }

    
The encryption key for your S3 bucket.

Returns:
The encryption key for your S3 bucket.
    public String getS3Key() {
        return ;
    }
    
    
The encryption key for your S3 bucket.

Parameters:
s3Key The encryption key for your S3 bucket.
    public void setS3Key(String s3Key) {
        this. = s3Key;
    }
    
    
The encryption key for your S3 bucket.

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

Parameters:
s3Key The encryption key for your S3 bucket.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportToS3Task withS3Key(String s3Key) {
        this. = s3Key;
        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 (getDiskImageFormat() != nullsb.append("DiskImageFormat: " + getDiskImageFormat() + ",");
        if (getContainerFormat() != nullsb.append("ContainerFormat: " + getContainerFormat() + ",");
        if (getS3Bucket() != nullsb.append("S3Bucket: " + getS3Bucket() + ",");
        if (getS3Key() != nullsb.append("S3Key: " + getS3Key() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDiskImageFormat() == null) ? 0 : getDiskImageFormat().hashCode()); 
        hashCode = prime * hashCode + ((getContainerFormat() == null) ? 0 : getContainerFormat().hashCode()); 
        hashCode = prime * hashCode + ((getS3Bucket() == null) ? 0 : getS3Bucket().hashCode()); 
        hashCode = prime * hashCode + ((getS3Key() == null) ? 0 : getS3Key().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ExportToS3Task == falsereturn false;
        ExportToS3Task other = (ExportToS3Task)obj;
        
        if (other.getDiskImageFormat() == null ^ this.getDiskImageFormat() == nullreturn false;
        if (other.getDiskImageFormat() != null && other.getDiskImageFormat().equals(this.getDiskImageFormat()) == falsereturn false
        if (other.getContainerFormat() == null ^ this.getContainerFormat() == nullreturn false;
        if (other.getContainerFormat() != null && other.getContainerFormat().equals(this.getContainerFormat()) == falsereturn false
        if (other.getS3Bucket() == null ^ this.getS3Bucket() == nullreturn false;
        if (other.getS3Bucket() != null && other.getS3Bucket().equals(this.getS3Bucket()) == falsereturn false
        if (other.getS3Key() == null ^ this.getS3Key() == nullreturn false;
        if (other.getS3Key() != null && other.getS3Key().equals(this.getS3Key()) == falsereturn false
        return true;
    }
    
    @Override
    public ExportToS3Task clone() {
        try {
            return (ExportToS3Tasksuper.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