/* * Copyright 2010-2018 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 conversion task. *
*/ public class ConversionTask implements Serializable { /** * The ID of the conversion task. */ private String conversionTaskId; /** * The time when the task expires. If the upload isn't complete before * the expiration time, we automatically cancel the task. */ private String expirationTime; /** * If the task is for importing an instance, this contains information * about the import instance task. */ private ImportInstanceTaskDetails importInstance; /** * If the task is for importing a volume, this contains information about * the import volume task. */ private ImportVolumeTaskDetails importVolume; /** * The state of the conversion task. *
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param conversionTaskId The ID of the conversion task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withConversionTaskId(String conversionTaskId) {
this.conversionTaskId = conversionTaskId;
return this;
}
/**
* The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*
* @return The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*/
public String getExpirationTime() {
return expirationTime;
}
/**
* The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*
* @param expirationTime The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*/
public void setExpirationTime(String expirationTime) {
this.expirationTime = expirationTime;
}
/**
* The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param expirationTime The time when the task expires. If the upload isn't complete before
* the expiration time, we automatically cancel the task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withExpirationTime(String expirationTime) {
this.expirationTime = expirationTime;
return this;
}
/**
* If the task is for importing an instance, this contains information
* about the import instance task.
*
* @return If the task is for importing an instance, this contains information
* about the import instance task.
*/
public ImportInstanceTaskDetails getImportInstance() {
return importInstance;
}
/**
* If the task is for importing an instance, this contains information
* about the import instance task.
*
* @param importInstance If the task is for importing an instance, this contains information
* about the import instance task.
*/
public void setImportInstance(ImportInstanceTaskDetails importInstance) {
this.importInstance = importInstance;
}
/**
* If the task is for importing an instance, this contains information
* about the import instance task.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param importInstance If the task is for importing an instance, this contains information
* about the import instance task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withImportInstance(ImportInstanceTaskDetails importInstance) {
this.importInstance = importInstance;
return this;
}
/**
* If the task is for importing a volume, this contains information about
* the import volume task.
*
* @return If the task is for importing a volume, this contains information about
* the import volume task.
*/
public ImportVolumeTaskDetails getImportVolume() {
return importVolume;
}
/**
* If the task is for importing a volume, this contains information about
* the import volume task.
*
* @param importVolume If the task is for importing a volume, this contains information about
* the import volume task.
*/
public void setImportVolume(ImportVolumeTaskDetails importVolume) {
this.importVolume = importVolume;
}
/**
* If the task is for importing a volume, this contains information about
* the import volume task.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param importVolume If the task is for importing a volume, this contains information about
* the import volume task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withImportVolume(ImportVolumeTaskDetails importVolume) {
this.importVolume = importVolume;
return this;
}
/**
* The state of the conversion task.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param statusMessage The status message related to the conversion task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
return this;
}
/**
* Any tags assigned to the task.
*
* @return Any tags assigned to the task.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags Any tags assigned to the task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withTags(Tag... tags) {
if (getTags() == null) setTags(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags Any tags assigned to the task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ConversionTask withTags(java.util.Collection
* Allowed Values: active, cancelling, cancelled, completed
*/
private String state;
/**
* The status message related to the conversion task.
*/
private String statusMessage;
/**
* Any tags assigned to the task.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag
* Allowed Values: active, cancelling, cancelled, completed
*
* @return The state of the conversion task.
*
* @see ConversionTaskState
*/
public String getState() {
return state;
}
/**
* The state of the conversion task.
*
* Allowed Values: active, cancelling, cancelled, completed
*
* @param state The state of the conversion task.
*
* @see ConversionTaskState
*/
public void setState(String state) {
this.state = state;
}
/**
* The state of the conversion task.
*
* Allowed Values: active, cancelling, cancelled, completed
*
* @param state The state of the conversion task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see ConversionTaskState
*/
public ConversionTask withState(String state) {
this.state = state;
return this;
}
/**
* The state of the conversion task.
*
* Allowed Values: active, cancelling, cancelled, completed
*
* @param state The state of the conversion task.
*
* @see ConversionTaskState
*/
public void setState(ConversionTaskState state) {
this.state = state.toString();
}
/**
* The state of the conversion task.
*
* Allowed Values: active, cancelling, cancelled, completed
*
* @param state The state of the conversion task.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see ConversionTaskState
*/
public ConversionTask withState(ConversionTaskState state) {
this.state = state.toString();
return this;
}
/**
* The status message related to the conversion task.
*
* @return The status message related to the conversion task.
*/
public String getStatusMessage() {
return statusMessage;
}
/**
* The status message related to the conversion task.
*
* @param statusMessage The status message related to the conversion task.
*/
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
/**
* The status message related to the conversion task.
*