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;
 
 
Container for the parameters to the ImportSnapshot operation.

Imports a disk into an EBS snapshot.

 
The description string for the import snapshot task.
 
     private String description;

    
Information about the disk container.
 
     private SnapshotDiskContainer diskContainer;

    
The client-specific data.
 
     private ClientData clientData;

    
Token to enable idempotency for VM import requests.
 
     private String clientToken;

    
The name of the role to use when not using the default role, 'vmimport'.
 
     private String roleName;

    
The description string for the import snapshot task.

Returns:
The description string for the import snapshot task.
 
     public String getDescription() {
         return ;
     }
    
    
The description string for the import snapshot task.

Parameters:
description The description string for the import snapshot task.
 
     public void setDescription(String description) {
         this. = description;
     }
    
    
The description string for the import snapshot task.

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

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

    
Information about the disk container.

Returns:
Information about the disk container.
 
         return ;
     }
    
    
Information about the disk container.

Parameters:
diskContainer Information about the disk container.
    public void setDiskContainer(SnapshotDiskContainer diskContainer) {
        this. = diskContainer;
    }
    
    
Information about the disk container.

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

Parameters:
diskContainer Information about the disk container.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = diskContainer;
        return this;
    }

    
The client-specific data.

Returns:
The client-specific data.
    public ClientData getClientData() {
        return ;
    }
    
    
The client-specific data.

Parameters:
clientData The client-specific data.
    public void setClientData(ClientData clientData) {
        this. = clientData;
    }
    
    
The client-specific data.

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

Parameters:
clientData The client-specific data.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportSnapshotRequest withClientData(ClientData clientData) {
        this. = clientData;
        return this;
    }

    
Token to enable idempotency for VM import requests.

Returns:
Token to enable idempotency for VM import requests.
    public String getClientToken() {
        return ;
    }
    
    
Token to enable idempotency for VM import requests.

Parameters:
clientToken Token to enable idempotency for VM import requests.
    public void setClientToken(String clientToken) {
        this. = clientToken;
    }
    
    
Token to enable idempotency for VM import requests.

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

Parameters:
clientToken Token to enable idempotency for VM import requests.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportSnapshotRequest withClientToken(String clientToken) {
        this. = clientToken;
        return this;
    }

    
The name of the role to use when not using the default role, 'vmimport'.

Returns:
The name of the role to use when not using the default role, 'vmimport'.
    public String getRoleName() {
        return ;
    }
    
    
The name of the role to use when not using the default role, 'vmimport'.

Parameters:
roleName The name of the role to use when not using the default role, 'vmimport'.
    public void setRoleName(String roleName) {
        this. = 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.

Parameters:
roleName The name of the role to use when not using the default role, 'vmimport'.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ImportSnapshotRequest withRoleName(String roleName) {
        this. = 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
        Request<ImportSnapshotRequestrequest = new ImportSnapshotRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
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 (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getDiskContainer() != nullsb.append("DiskContainer: " + getDiskContainer() + ",");
        if (getClientData() != nullsb.append("ClientData: " + getClientData() + ",");
        if (getClientToken() != nullsb.append("ClientToken: " + getClientToken() + ",");
        if (getRoleName() != nullsb.append("RoleName: " + getRoleName() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getDiskContainer() == null) ? 0 : getDiskContainer().hashCode()); 
        hashCode = prime * hashCode + ((getClientData() == null) ? 0 : getClientData().hashCode()); 
        hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); 
        hashCode = prime * hashCode + ((getRoleName() == null) ? 0 : getRoleName().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ImportSnapshotRequest == falsereturn false;
        ImportSnapshotRequest other = (ImportSnapshotRequest)obj;
        
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getDiskContainer() == null ^ this.getDiskContainer() == nullreturn false;
        if (other.getDiskContainer() != null && other.getDiskContainer().equals(this.getDiskContainer()) == falsereturn false
        if (other.getClientData() == null ^ this.getClientData() == nullreturn false;
        if (other.getClientData() != null && other.getClientData().equals(this.getClientData()) == falsereturn false
        if (other.getClientToken() == null ^ this.getClientToken() == nullreturn false;
        if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == falsereturn false
        if (other.getRoleName() == null ^ this.getRoleName() == nullreturn false;
        if (other.getRoleName() != null && other.getRoleName().equals(this.getRoleName()) == falsereturn false
        return true;
    }
    
    @Override
    public ImportSnapshotRequest clone() {
        
            return (ImportSnapshotRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X