/* * 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; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.ImportSnapshotRequestMarshaller; /** * Container for the parameters to the {@link com.amazonaws.services.ec2.AmazonEC2#importSnapshot(ImportSnapshotRequest) ImportSnapshot operation}. *
* Imports a disk into an EBS snapshot. *
* * @see com.amazonaws.services.ec2.AmazonEC2#importSnapshot(ImportSnapshotRequest) */ public class ImportSnapshotRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest* Returns a reference to this object so that method calls can be chained together. * * @param description The description string for the import snapshot task. * * @return A reference to this updated object so that method calls can be chained * together. */ public ImportSnapshotRequest withDescription(String description) { this.description = description; return this; } /** * Information about the disk container. * * @return Information about the disk container. */ public SnapshotDiskContainer getDiskContainer() { return diskContainer; } /** * Information about the disk container. * * @param diskContainer Information about the disk container. */ public void setDiskContainer(SnapshotDiskContainer diskContainer) { this.diskContainer = diskContainer; } /** * Information about the disk container. *
* Returns a reference to this object so that method calls can be chained together. * * @param diskContainer Information about the disk container. * * @return A reference to this updated object so that method calls can be chained * together. */ public ImportSnapshotRequest withDiskContainer(SnapshotDiskContainer diskContainer) { this.diskContainer = diskContainer; return this; } /** * The client-specific data. * * @return The client-specific data. */ public ClientData getClientData() { return clientData; } /** * The client-specific data. * * @param clientData The client-specific data. */ public void setClientData(ClientData clientData) { this.clientData = clientData; } /** * The client-specific data. *
* Returns a reference to this object so that method calls can be chained together. * * @param clientData The client-specific data. * * @return A reference to this updated object so that method calls can be chained * together. */ public ImportSnapshotRequest withClientData(ClientData clientData) { this.clientData = clientData; return this; } /** * Token to enable idempotency for VM import requests. * * @return Token to enable idempotency for VM import requests. */ public String getClientToken() { return clientToken; } /** * Token to enable idempotency for VM import requests. * * @param clientToken Token to enable idempotency for VM import requests. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** * Token to enable idempotency for VM import requests. *
* Returns a reference to this object so that method calls can be chained together. * * @param clientToken Token to enable idempotency for VM import requests. * * @return A reference to this updated object so that method calls can be chained * together. */ public ImportSnapshotRequest withClientToken(String clientToken) { this.clientToken = clientToken; return this; } /** * The name of the role to use when not using the default role, * 'vmimport'. * * @return The name of the role to use when not using the default role, * 'vmimport'. */ public String getRoleName() { return roleName; } /** * The name of the role to use when not using the default role, * 'vmimport'. * * @param roleName The name of the role to use when not using the default role, * 'vmimport'. */ public void setRoleName(String roleName) { this.roleName = roleName; } /** * The name of the role to use when not using the default role, * 'vmimport'. *
* Returns a reference to this object so that method calls can be chained together.
*
* @param roleName The name of the role to use when not using the default role,
* 'vmimport'.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ImportSnapshotRequest withRoleName(String roleName) {
this.roleName = roleName;
return this;
}
/**
* This method is intended for internal use only.
* Returns the marshaled request configured with additional parameters to
* enable operation dry-run.
*/
@Override
public Request