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 ExportToS3TaskSpecification implements SerializableCloneable {

    

Constraints:
Allowed Values: VMDK, RAW, VHD

 
     private String diskImageFormat;

    

Constraints:
Allowed Values: ova

 
     private String containerFormat;

    
 
     private String s3Bucket;

    
The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.
 
     private String s3Prefix;

    

Constraints:
Allowed Values: VMDK, RAW, VHD

Returns:
See also:
DiskImageFormat
 
     public String getDiskImageFormat() {
         return ;
     }
    
    

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat
See also:
DiskImageFormat
 
     public void setDiskImageFormat(String diskImageFormat) {
         this. = diskImageFormat;
     }
    
    

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

Constraints:
Allowed Values: VMDK, RAW, VHD

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

    

Constraints:
Allowed Values: VMDK, RAW, VHD

Parameters:
diskImageFormat
See also:
DiskImageFormat
    public void setDiskImageFormat(DiskImageFormat diskImageFormat) {
        this. = diskImageFormat.toString();
    }
    
    

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

Constraints:
Allowed Values: VMDK, RAW, VHD

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

    

Constraints:
Allowed Values: ova

Returns:
See also:
ContainerFormat
    public String getContainerFormat() {
        return ;
    }
    
    

Constraints:
Allowed Values: ova

Parameters:
containerFormat
See also:
ContainerFormat
    public void setContainerFormat(String containerFormat) {
        this. = containerFormat;
    }
    
    

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

Constraints:
Allowed Values: ova

Parameters:
containerFormat
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ContainerFormat
    public ExportToS3TaskSpecification withContainerFormat(String containerFormat) {
        this. = containerFormat;
        return this;
    }

    

Constraints:
Allowed Values: ova

Parameters:
containerFormat
See also:
ContainerFormat
    public void setContainerFormat(ContainerFormat containerFormat) {
        this. = containerFormat.toString();
    }
    
    

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

Constraints:
Allowed Values: ova

Parameters:
containerFormat
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ContainerFormat
        this. = containerFormat.toString();
        return this;
    }

    

Returns:
    public String getS3Bucket() {
        return ;
    }
    
    

Parameters:
s3Bucket
    public void setS3Bucket(String s3Bucket) {
        this. = s3Bucket;
    }
    
    

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

Parameters:
s3Bucket
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportToS3TaskSpecification withS3Bucket(String s3Bucket) {
        this. = s3Bucket;
        return this;
    }

    
The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

Returns:
The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.
    public String getS3Prefix() {
        return ;
    }
    
    
The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

Parameters:
s3Prefix The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.
    public void setS3Prefix(String s3Prefix) {
        this. = s3Prefix;
    }
    
    
The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

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

Parameters:
s3Prefix The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportToS3TaskSpecification withS3Prefix(String s3Prefix) {
        this. = s3Prefix;
        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 (getS3Prefix() != nullsb.append("S3Prefix: " + getS3Prefix() );
        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 + ((getS3Prefix() == null) ? 0 : getS3Prefix().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ExportToS3TaskSpecification == falsereturn false;
        
        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.getS3Prefix() == null ^ this.getS3Prefix() == nullreturn false;
        if (other.getS3Prefix() != null && other.getS3Prefix().equals(this.getS3Prefix()) == falsereturn false
        return true;
    }
    
    @Override
        try {
            return (ExportToS3TaskSpecificationsuper.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