All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.storagegateway.model.CreateCachediSCSIVolumeRequest Maven / Gradle / Ivy

Go to download

The Amazon Web Services SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

The newest version!
/*
 * Copyright 2010-2014 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;

import java.io.Serializable;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * Container for the parameters to the {@link com.amazonaws.services.storagegateway.AWSStorageGateway#createCachediSCSIVolume(CreateCachediSCSIVolumeRequest) 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. *

* * @see com.amazonaws.services.storagegateway.AWSStorageGateway#createCachediSCSIVolume(CreateCachediSCSIVolumeRequest) */ public class CreateCachediSCSIVolumeRequest extends AmazonWebServiceRequest implements Serializable { /** * 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
* * @return 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 gatewayARN; } /** * 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
* * @param 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 = 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
* * @param gatewayARN The Amazon Resource Name (ARN) of the gateway. Use the * ListGateways operation to return a list of gateways for your * account and region. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withGatewayARN(String gatewayARN) { this.gatewayARN = gatewayARN; return this; } /** * Returns the value of the VolumeSizeInBytes property for this object. * * @return The value of the VolumeSizeInBytes property for this object. */ public Long getVolumeSizeInBytes() { return volumeSizeInBytes; } /** * Sets the value of the VolumeSizeInBytes property for this object. * * @param volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object. */ public void setVolumeSizeInBytes(Long volumeSizeInBytes) { this.volumeSizeInBytes = 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. * * @param volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withVolumeSizeInBytes(Long volumeSizeInBytes) { this.volumeSizeInBytes = volumeSizeInBytes; return this; } /** * Returns the value of the SnapshotId property for this object. *

* Constraints:
* Pattern: \Asnap-[0-9a-fA-F]{8}\z
* * @return The value of the SnapshotId property for this object. */ public String getSnapshotId() { return snapshotId; } /** * Sets the value of the SnapshotId property for this object. *

* Constraints:
* Pattern: \Asnap-[0-9a-fA-F]{8}\z
* * @param snapshotId The new value for the SnapshotId property for this object. */ public void setSnapshotId(String snapshotId) { this.snapshotId = 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
* * @param snapshotId The new value for the SnapshotId property for this object. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withSnapshotId(String snapshotId) { this.snapshotId = snapshotId; return this; } /** * Returns the value of the TargetName property for this object. *

* Constraints:
* Length: 1 - 200
* Pattern: ^[-\.;a-z0-9]+$
* * @return The value of the TargetName property for this object. */ public String getTargetName() { return targetName; } /** * Sets the value of the TargetName property for this object. *

* Constraints:
* Length: 1 - 200
* Pattern: ^[-\.;a-z0-9]+$
* * @param targetName The new value for the TargetName property for this object. */ public void setTargetName(String targetName) { this.targetName = 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]+$
* * @param targetName The new value for the TargetName property for this object. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withTargetName(String targetName) { this.targetName = 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
* * @return The value of the NetworkInterfaceId property for this object. */ public String getNetworkInterfaceId() { return networkInterfaceId; } /** * 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
* * @param networkInterfaceId The new value for the NetworkInterfaceId property for this object. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = 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
* * @param networkInterfaceId The new value for the NetworkInterfaceId property for this object. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; return this; } /** * Returns the value of the ClientToken property for this object. *

* Constraints:
* Length: 5 - 100
* * @return The value of the ClientToken property for this object. */ public String getClientToken() { return clientToken; } /** * Sets the value of the ClientToken property for this object. *

* Constraints:
* Length: 5 - 100
* * @param clientToken The new value for the ClientToken property for this object. */ public void setClientToken(String clientToken) { this.clientToken = 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
* * @param clientToken The new value for the ClientToken property for this object. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateCachediSCSIVolumeRequest withClientToken(String clientToken) { this.clientToken = clientToken; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getGatewayARN() != null) sb.append("GatewayARN: " + getGatewayARN() + ","); if (getVolumeSizeInBytes() != null) sb.append("VolumeSizeInBytes: " + getVolumeSizeInBytes() + ","); if (getSnapshotId() != null) sb.append("SnapshotId: " + getSnapshotId() + ","); if (getTargetName() != null) sb.append("TargetName: " + getTargetName() + ","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: " + getNetworkInterfaceId() + ","); if (getClientToken() != null) sb.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 == obj) return true; if (obj == null) return false; if (obj instanceof CreateCachediSCSIVolumeRequest == false) return false; CreateCachediSCSIVolumeRequest other = (CreateCachediSCSIVolumeRequest)obj; if (other.getGatewayARN() == null ^ this.getGatewayARN() == null) return false; if (other.getGatewayARN() != null && other.getGatewayARN().equals(this.getGatewayARN()) == false) return false; if (other.getVolumeSizeInBytes() == null ^ this.getVolumeSizeInBytes() == null) return false; if (other.getVolumeSizeInBytes() != null && other.getVolumeSizeInBytes().equals(this.getVolumeSizeInBytes()) == false) return false; if (other.getSnapshotId() == null ^ this.getSnapshotId() == null) return false; if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false) return false; if (other.getTargetName() == null ^ this.getTargetName() == null) return false; if (other.getTargetName() != null && other.getTargetName().equals(this.getTargetName()) == false) return false; if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == null) return false; if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy