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 an instance export task.

 
 public class ExportTask implements SerializableCloneable {

    
The ID of the export task.
 
     private String exportTaskId;

    
A description of the resource being exported.
 
     private String description;

    
The state of the export task.

Constraints:
Allowed Values: active, cancelling, cancelled, completed

 
     private String state;

    
The status message related to the export task.
 
     private String statusMessage;

    
Information about the instance to export.
 
     private InstanceExportDetails instanceExportDetails;

    
Information about the export task.
 
     private ExportToS3Task exportToS3Task;

    
The ID of the export task.

Returns:
The ID of the export task.
 
     public String getExportTaskId() {
         return ;
     }
    
    
The ID of the export task.

Parameters:
exportTaskId The ID of the export task.
 
     public void setExportTaskId(String exportTaskId) {
         this. = exportTaskId;
     }
    
    
The ID of the export task.

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

Parameters:
exportTaskId The ID of the export task.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ExportTask withExportTaskId(String exportTaskId) {
         this. = exportTaskId;
         return this;
     }

    
A description of the resource being exported.

Returns:
A description of the resource being exported.
 
     public String getDescription() {
         return ;
     }
    
    
A description of the resource being exported.

Parameters:
description A description of the resource being exported.
    public void setDescription(String description) {
        this. = description;
    }
    
    
A description of the resource being exported.

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

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

    
The state of the export task.

Constraints:
Allowed Values: active, cancelling, cancelled, completed

Returns:
The state of the export task.
See also:
ExportTaskState
    public String getState() {
        return ;
    }
    
    
The state of the export task.

Constraints:
Allowed Values: active, cancelling, cancelled, completed

Parameters:
state The state of the export task.
See also:
ExportTaskState
    public void setState(String state) {
        this. = state;
    }
    
    
The state of the export task.

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

Constraints:
Allowed Values: active, cancelling, cancelled, completed

Parameters:
state The state of the export task.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ExportTaskState
    public ExportTask withState(String state) {
        this. = state;
        return this;
    }

    
The state of the export task.

Constraints:
Allowed Values: active, cancelling, cancelled, completed

Parameters:
state The state of the export task.
See also:
ExportTaskState
    public void setState(ExportTaskState state) {
        this. = state.toString();
    }
    
    
The state of the export task.

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

Constraints:
Allowed Values: active, cancelling, cancelled, completed

Parameters:
state The state of the export task.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ExportTaskState
    public ExportTask withState(ExportTaskState state) {
        this. = state.toString();
        return this;
    }

    
The status message related to the export task.

Returns:
The status message related to the export task.
    public String getStatusMessage() {
        return ;
    }
    
    
The status message related to the export task.

Parameters:
statusMessage The status message related to the export task.
    public void setStatusMessage(String statusMessage) {
        this. = statusMessage;
    }
    
    
The status message related to the export task.

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

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

    
Information about the instance to export.

Returns:
Information about the instance to export.
        return ;
    }
    
    
Information about the instance to export.

Parameters:
instanceExportDetails Information about the instance to export.
    public void setInstanceExportDetails(InstanceExportDetails instanceExportDetails) {
        this. = instanceExportDetails;
    }
    
    
Information about the instance to export.

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

Parameters:
instanceExportDetails Information about the instance to export.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportTask withInstanceExportDetails(InstanceExportDetails instanceExportDetails) {
        this. = instanceExportDetails;
        return this;
    }

    
Information about the export task.

Returns:
Information about the export task.
    public ExportToS3Task getExportToS3Task() {
        return ;
    }
    
    
Information about the export task.

Parameters:
exportToS3Task Information about the export task.
    public void setExportToS3Task(ExportToS3Task exportToS3Task) {
        this. = exportToS3Task;
    }
    
    
Information about the export task.

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

Parameters:
exportToS3Task Information about the export task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ExportTask withExportToS3Task(ExportToS3Task exportToS3Task) {
        this. = exportToS3Task;
        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 (getExportTaskId() != nullsb.append("ExportTaskId: " + getExportTaskId() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getState() != nullsb.append("State: " + getState() + ",");
        if (getStatusMessage() != nullsb.append("StatusMessage: " + getStatusMessage() + ",");
        if (getInstanceExportDetails() != nullsb.append("InstanceExportDetails: " + getInstanceExportDetails() + ",");
        if (getExportToS3Task() != nullsb.append("ExportToS3Task: " + getExportToS3Task() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getExportTaskId() == null) ? 0 : getExportTaskId().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); 
        hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceExportDetails() == null) ? 0 : getInstanceExportDetails().hashCode()); 
        hashCode = prime * hashCode + ((getExportToS3Task() == null) ? 0 : getExportToS3Task().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ExportTask == falsereturn false;
        ExportTask other = (ExportTask)obj;
        
        if (other.getExportTaskId() == null ^ this.getExportTaskId() == nullreturn false;
        if (other.getExportTaskId() != null && other.getExportTaskId().equals(this.getExportTaskId()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getState() == null ^ this.getState() == nullreturn false;
        if (other.getState() != null && other.getState().equals(this.getState()) == falsereturn false
        if (other.getStatusMessage() == null ^ this.getStatusMessage() == nullreturn false;
        if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == falsereturn false
        if (other.getInstanceExportDetails() == null ^ this.getInstanceExportDetails() == nullreturn false;
        if (other.getInstanceExportDetails() != null && other.getInstanceExportDetails().equals(this.getInstanceExportDetails()) == falsereturn false
        if (other.getExportToS3Task() == null ^ this.getExportToS3Task() == nullreturn false;
        if (other.getExportToS3Task() != null && other.getExportToS3Task().equals(this.getExportToS3Task()) == falsereturn false
        return true;
    }
    
    @Override
    public ExportTask clone() {
        try {
            return (ExportTasksuper.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