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

    
The task id of the ImportImage task.
 
     private String importTaskId;

    
Architecture of the virtual machine being imported.
 
     private String architecture;

    
License type of the virtual machine being imported.
 
     private String licenseType;

    
Operating system of the VM being imported.
 
     private String platform;

    
Target hypervisor of the import task.
 
     private String hypervisor;

    
A description of the import task.
 
     private String description;

    
 
The Amazon Machine Image (AMI) ID created by the import task.
 
     private String imageId;

    
The task's progress.
 
     private String progress;

    
A detailed status message of the import task.
 
     private String statusMessage;

    
A brief status of the task.
 
     private String status;

    
The task id of the ImportImage task.

Returns:
The task id of the ImportImage task.
 
     public String getImportTaskId() {
         return ;
     }
    
    
The task id of the ImportImage task.

Parameters:
importTaskId The task id of the ImportImage task.
 
     public void setImportTaskId(String importTaskId) {
         this. = importTaskId;
     }
    
    
The task id of the ImportImage task.

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

Parameters:
importTaskId The task id of the ImportImage task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withImportTaskId(String importTaskId) {
        this. = importTaskId;
        return this;
    }

    
Architecture of the virtual machine being imported.

Returns:
Architecture of the virtual machine being imported.
    public String getArchitecture() {
        return ;
    }
    
    
Architecture of the virtual machine being imported.

Parameters:
architecture Architecture of the virtual machine being imported.
    public void setArchitecture(String architecture) {
        this. = architecture;
    }
    
    
Architecture of the virtual machine being imported.

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

Parameters:
architecture Architecture of the virtual machine being imported.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withArchitecture(String architecture) {
        this. = architecture;
        return this;
    }

    
License type of the virtual machine being imported.

Returns:
License type of the virtual machine being imported.
    public String getLicenseType() {
        return ;
    }
    
    
License type of the virtual machine being imported.

Parameters:
licenseType License type of the virtual machine being imported.
    public void setLicenseType(String licenseType) {
        this. = licenseType;
    }
    
    
License type of the virtual machine being imported.

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

Parameters:
licenseType License type of the virtual machine being imported.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withLicenseType(String licenseType) {
        this. = licenseType;
        return this;
    }

    
Operating system of the VM being imported.

Returns:
Operating system of the VM being imported.
    public String getPlatform() {
        return ;
    }
    
    
Operating system of the VM being imported.

Parameters:
platform Operating system of the VM being imported.
    public void setPlatform(String platform) {
        this. = platform;
    }
    
    
Operating system of the VM being imported.

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

Parameters:
platform Operating system of the VM being imported.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withPlatform(String platform) {
        this. = platform;
        return this;
    }

    
Target hypervisor of the import task.

Returns:
Target hypervisor of the import task.
    public String getHypervisor() {
        return ;
    }
    
    
Target hypervisor of the import task.

Parameters:
hypervisor Target hypervisor of the import task.
    public void setHypervisor(String hypervisor) {
        this. = hypervisor;
    }
    
    
Target hypervisor of the import task.

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

Parameters:
hypervisor Target hypervisor of the import task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withHypervisor(String hypervisor) {
        this. = hypervisor;
        return this;
    }

    
A description of the import task.

Returns:
A description of the import task.
    public String getDescription() {
        return ;
    }
    
    
A description of the import task.

Parameters:
description A description of the import task.
    public void setDescription(String description) {
        this. = description;
    }
    
    
A description of the import task.

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

Parameters:
description A description of the import task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withDescription(String description) {
        this. = description;
        return this;
    }

    

Returns:
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    

Parameters:
snapshotDetails
    public void setSnapshotDetails(java.util.Collection<SnapshotDetailsnapshotDetails) {
        if (snapshotDetails == null) {
            this. = null;
            return;
        }
        snapshotDetailsCopy.addAll(snapshotDetails);
        this. = snapshotDetailsCopy;
    }
    
    

NOTE: This method appends the values to the existing list (if any). Use setSnapshotDetails(java.util.Collection) or withSnapshotDetails(java.util.Collection) if you want to override the existing values.

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

Parameters:
snapshotDetails
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withSnapshotDetails(SnapshotDetail... snapshotDetails) {
        if (getSnapshotDetails() == nullsetSnapshotDetails(new java.util.ArrayList<SnapshotDetail>(snapshotDetails.length));
        for (SnapshotDetail value : snapshotDetails) {
            getSnapshotDetails().add(value);
        }
        return this;
    }
    
    

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

Parameters:
snapshotDetails
Returns:
A reference to this updated object so that method calls can be chained together.
        if (snapshotDetails == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<SnapshotDetailsnapshotDetailsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<SnapshotDetail>(snapshotDetails.size());
            snapshotDetailsCopy.addAll(snapshotDetails);
            this. = snapshotDetailsCopy;
        }
        return this;
    }

    
The Amazon Machine Image (AMI) ID created by the import task.

Returns:
The Amazon Machine Image (AMI) ID created by the import task.
    public String getImageId() {
        return ;
    }
    
    
The Amazon Machine Image (AMI) ID created by the import task.

Parameters:
imageId The Amazon Machine Image (AMI) ID created by the import task.
    public void setImageId(String imageId) {
        this. = imageId;
    }
    
    
The Amazon Machine Image (AMI) ID created by the import task.

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

Parameters:
imageId The Amazon Machine Image (AMI) ID created by the import task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withImageId(String imageId) {
        this. = imageId;
        return this;
    }

    
The task's progress.

Returns:
The task's progress.
    public String getProgress() {
        return ;
    }
    
    
The task's progress.

Parameters:
progress The task's progress.
    public void setProgress(String progress) {
        this. = progress;
    }
    
    
The task's progress.

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

Parameters:
progress The task's progress.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withProgress(String progress) {
        this. = progress;
        return this;
    }

    
A detailed status message of the import task.

Returns:
A detailed status message of the import task.
    public String getStatusMessage() {
        return ;
    }
    
    
A detailed status message of the import task.

Parameters:
statusMessage A detailed status message of the import task.
    public void setStatusMessage(String statusMessage) {
        this. = statusMessage;
    }
    
    
A detailed status message of the import task.

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

Parameters:
statusMessage A detailed status message of the import task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withStatusMessage(String statusMessage) {
        this. = statusMessage;
        return this;
    }

    
A brief status of the task.

Returns:
A brief status of the task.
    public String getStatus() {
        return ;
    }
    
    
A brief status of the task.

Parameters:
status A brief status of the task.
    public void setStatus(String status) {
        this. = status;
    }
    
    
A brief status of the task.

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

Parameters:
status A brief status of the task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportImageResult withStatus(String status) {
        this. = status;
        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 (getImportTaskId() != nullsb.append("ImportTaskId: " + getImportTaskId() + ",");
        if (getArchitecture() != nullsb.append("Architecture: " + getArchitecture() + ",");
        if (getLicenseType() != nullsb.append("LicenseType: " + getLicenseType() + ",");
        if (getPlatform() != nullsb.append("Platform: " + getPlatform() + ",");
        if (getHypervisor() != nullsb.append("Hypervisor: " + getHypervisor() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getSnapshotDetails() != nullsb.append("SnapshotDetails: " + getSnapshotDetails() + ",");
        if (getImageId() != nullsb.append("ImageId: " + getImageId() + ",");
        if (getProgress() != nullsb.append("Progress: " + getProgress() + ",");
        if (getStatusMessage() != nullsb.append("StatusMessage: " + getStatusMessage() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getImportTaskId() == null) ? 0 : getImportTaskId().hashCode()); 
        hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode()); 
        hashCode = prime * hashCode + ((getLicenseType() == null) ? 0 : getLicenseType().hashCode()); 
        hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); 
        hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotDetails() == null) ? 0 : getSnapshotDetails().hashCode()); 
        hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); 
        hashCode = prime * hashCode + ((getProgress() == null) ? 0 : getProgress().hashCode()); 
        hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ImportImageResult == falsereturn false;
        ImportImageResult other = (ImportImageResult)obj;
        
        if (other.getImportTaskId() == null ^ this.getImportTaskId() == nullreturn false;
        if (other.getImportTaskId() != null && other.getImportTaskId().equals(this.getImportTaskId()) == falsereturn false
        if (other.getArchitecture() == null ^ this.getArchitecture() == nullreturn false;
        if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == falsereturn false
        if (other.getLicenseType() == null ^ this.getLicenseType() == nullreturn false;
        if (other.getLicenseType() != null && other.getLicenseType().equals(this.getLicenseType()) == falsereturn false
        if (other.getPlatform() == null ^ this.getPlatform() == nullreturn false;
        if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == falsereturn false
        if (other.getHypervisor() == null ^ this.getHypervisor() == nullreturn false;
        if (other.getHypervisor() != null && other.getHypervisor().equals(this.getHypervisor()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getSnapshotDetails() == null ^ this.getSnapshotDetails() == nullreturn false;
        if (other.getSnapshotDetails() != null && other.getSnapshotDetails().equals(this.getSnapshotDetails()) == falsereturn false
        if (other.getImageId() == null ^ this.getImageId() == nullreturn false;
        if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == falsereturn false
        if (other.getProgress() == null ^ this.getProgress() == nullreturn false;
        if (other.getProgress() != null && other.getProgress().equals(this.getProgress()) == falsereturn false
        if (other.getStatusMessage() == null ^ this.getStatusMessage() == nullreturn false;
        if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public ImportImageResult clone() {
        try {
            return (ImportImageResultsuper.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