/* * Copyright 2018-2023 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; import javax.annotation.Generated; /** *
* Describes a conversion task. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ConversionTask implements Serializable, Cloneable { /** ** 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. *
*/ private String state; /** ** The status message related to the conversion task. *
*/ private String statusMessage; /** ** Any tags assigned to the task. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the conversion task. *
* * @param conversionTaskId * The ID of the conversion task. */ public void setConversionTaskId(String conversionTaskId) { this.conversionTaskId = conversionTaskId; } /** ** The ID of the conversion task. *
* * @return The ID of the conversion task. */ public String getConversionTaskId() { return this.conversionTaskId; } /** ** The ID of the conversion task. *
* * @param conversionTaskId * The ID of the conversion task. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withConversionTaskId(String conversionTaskId) { setConversionTaskId(conversionTaskId); return this; } /** ** 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. *
* * @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 this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withExpirationTime(String expirationTime) { setExpirationTime(expirationTime); return this; } /** ** 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. *
* * @return If the task is for importing an instance, this contains information about the import instance task. */ public ImportInstanceTaskDetails getImportInstance() { return this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withImportInstance(ImportInstanceTaskDetails importInstance) { setImportInstance(importInstance); return this; } /** ** 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. *
* * @return If the task is for importing a volume, this contains information about the import volume task. */ public ImportVolumeTaskDetails getImportVolume() { return this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withImportVolume(ImportVolumeTaskDetails importVolume) { setImportVolume(importVolume); return this; } /** ** The state of the conversion task. *
* * @param state * The state of the conversion task. * @see ConversionTaskState */ public void setState(String state) { this.state = state; } /** ** The state of the conversion task. *
* * @return The state of the conversion task. * @see ConversionTaskState */ public String getState() { return this.state; } /** ** The state of the conversion task. *
* * @param state * The state of the conversion task. * @return Returns a reference to this object so that method calls can be chained together. * @see ConversionTaskState */ public ConversionTask withState(String state) { setState(state); return this; } /** ** The state of the conversion task. *
* * @param state * The state of the conversion task. * @see ConversionTaskState */ public void setState(ConversionTaskState state) { withState(state); } /** ** The state of the conversion task. *
* * @param state * The state of the conversion task. * @return Returns a reference to this 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. *
* * @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. *
* * @return The status message related to the conversion task. */ public String getStatusMessage() { return this.statusMessage; } /** ** The status message related to the conversion task. *
* * @param statusMessage * The status message related to the conversion task. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** ** Any tags assigned to the task. *
* * @return Any tags assigned to the task. */ public java.util.List* Any tags assigned to the task. *
* * @param tags * Any tags assigned to the task. */ public void setTags(java.util.Collection* Any tags assigned to the task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Any tags assigned to the task. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the task. *
* * @param tags * Any tags assigned to the task. * @return Returns a reference to this object so that method calls can be chained together. */ public ConversionTask withTags(java.util.Collection