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

This operation creates a cached volume on a specified cached gateway. This operation is supported only for the gateway-cached volume architecture.

NOTE:Cache storage must be allocated to the gateway before you can create a cached volume. Use the AddCache operation to add cache storage to a gateway.

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI target name, an IP address on which to expose the target, and a unique client token. In response, AWS Storage Gateway creates the volume and returns information about it such as the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

 
 public class CreateCachediSCSIVolumeRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

Constraints:
Length: 50 - 500

 
     private String gatewayARN;
 
     private Long volumeSizeInBytes;
 
     private String snapshotId;
 
     private String targetName;
 
     private String networkInterfaceId;
 
     private String clientToken;

    
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

Constraints:
Length: 50 - 500

Returns:
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.
 
     public String getGatewayARN() {
         return ;
     }
    
    
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

Constraints:
Length: 50 - 500

Parameters:
gatewayARN The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.
 
     public void setGatewayARN(String gatewayARN) {
         this. = gatewayARN;
     }
    
    
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

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

Constraints:
Length: 50 - 500

Parameters:
gatewayARN The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = gatewayARN;
        return this;
    }

    
Returns the value of the VolumeSizeInBytes property for this object.

Returns:
The value of the VolumeSizeInBytes property for this object.
    public Long getVolumeSizeInBytes() {
        return ;
    }
    
    
Sets the value of the VolumeSizeInBytes property for this object.

Parameters:
volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object.
    public void setVolumeSizeInBytes(Long volumeSizeInBytes) {
        this. = volumeSizeInBytes;
    }
    
    
Sets the value of the VolumeSizeInBytes property for this object.

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

Parameters:
volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCachediSCSIVolumeRequest withVolumeSizeInBytes(Long volumeSizeInBytes) {
        this. = volumeSizeInBytes;
        return this;
    }

    
Returns the value of the SnapshotId property for this object.

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Returns:
The value of the SnapshotId property for this object.
    public String getSnapshotId() {
        return ;
    }
    
    
Sets the value of the SnapshotId property for this object.

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Parameters:
snapshotId The new value for the SnapshotId property for this object.
    public void setSnapshotId(String snapshotId) {
        this. = snapshotId;
    }
    
    
Sets the value of the SnapshotId property for this object.

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

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Parameters:
snapshotId The new value for the SnapshotId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = snapshotId;
        return this;
    }

    
Returns the value of the TargetName property for this object.

Constraints:
Length: 1 - 200
Pattern: ^[-\.;a-z0-9]+$

Returns:
The value of the TargetName property for this object.
    public String getTargetName() {
        return ;
    }
    
    
Sets the value of the TargetName property for this object.

Constraints:
Length: 1 - 200
Pattern: ^[-\.;a-z0-9]+$

Parameters:
targetName The new value for the TargetName property for this object.
    public void setTargetName(String targetName) {
        this. = targetName;
    }
    
    
Sets the value of the TargetName property for this object.

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

Constraints:
Length: 1 - 200
Pattern: ^[-\.;a-z0-9]+$

Parameters:
targetName The new value for the TargetName property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = targetName;
        return this;
    }

    
Returns the value of the NetworkInterfaceId property for this object.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Returns:
The value of the NetworkInterfaceId property for this object.
    public String getNetworkInterfaceId() {
        return ;
    }
    
    
Sets the value of the NetworkInterfaceId property for this object.

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Parameters:
networkInterfaceId The new value for the NetworkInterfaceId property for this object.
    public void setNetworkInterfaceId(String networkInterfaceId) {
        this. = networkInterfaceId;
    }
    
    
Sets the value of the NetworkInterfaceId property for this object.

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

Constraints:
Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\z

Parameters:
networkInterfaceId The new value for the NetworkInterfaceId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCachediSCSIVolumeRequest withNetworkInterfaceId(String networkInterfaceId) {
        this. = networkInterfaceId;
        return this;
    }

    
Returns the value of the ClientToken property for this object.

Constraints:
Length: 5 - 100

Returns:
The value of the ClientToken property for this object.
    public String getClientToken() {
        return ;
    }
    
    
Sets the value of the ClientToken property for this object.

Constraints:
Length: 5 - 100

Parameters:
clientToken The new value for the ClientToken property for this object.
    public void setClientToken(String clientToken) {
        this. = clientToken;
    }
    
    
Sets the value of the ClientToken property for this object.

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

Constraints:
Length: 5 - 100

Parameters:
clientToken The new value for the ClientToken property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCachediSCSIVolumeRequest withClientToken(String clientToken) {
        this. = clientToken;
        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 (getGatewayARN() != nullsb.append("GatewayARN: " + getGatewayARN() + ",");
        if (getVolumeSizeInBytes() != nullsb.append("VolumeSizeInBytes: " + getVolumeSizeInBytes() + ",");
        if (getSnapshotId() != nullsb.append("SnapshotId: " + getSnapshotId() + ",");
        if (getTargetName() != nullsb.append("TargetName: " + getTargetName() + ",");
        if (getNetworkInterfaceId() != nullsb.append("NetworkInterfaceId: " + getNetworkInterfaceId() + ",");
        if (getClientToken() != nullsb.append("ClientToken: " + getClientToken() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getGatewayARN() == null) ? 0 : getGatewayARN().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeSizeInBytes() == null) ? 0 : getVolumeSizeInBytes().hashCode()); 
        hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); 
        hashCode = prime * hashCode + ((getTargetName() == null) ? 0 : getTargetName().hashCode()); 
        hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); 
        hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateCachediSCSIVolumeRequest == falsereturn false;
        
        if (other.getGatewayARN() == null ^ this.getGatewayARN() == nullreturn false;
        if (other.getGatewayARN() != null && other.getGatewayARN().equals(this.getGatewayARN()) == falsereturn false
        if (other.getVolumeSizeInBytes() == null ^ this.getVolumeSizeInBytes() == nullreturn false;
        if (other.getVolumeSizeInBytes() != null && other.getVolumeSizeInBytes().equals(this.getVolumeSizeInBytes()) == falsereturn false
        if (other.getSnapshotId() == null ^ this.getSnapshotId() == nullreturn false;
        if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == falsereturn false
        if (other.getTargetName() == null ^ this.getTargetName() == nullreturn false;
        if (other.getTargetName() != null && other.getTargetName().equals(this.getTargetName()) == falsereturn false
        if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == nullreturn false;
        if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == falsereturn false
        if (other.getClientToken() == null ^ this.getClientToken() == nullreturn false;
        if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (CreateCachediSCSIVolumeRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X