com.amazonaws.services.storagegateway.model.CreateTapesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-storagegateway Show documentation
/*
* Copyright 2013-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.storagegateway.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* CreateTapesInput
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateTapesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use the
* ListGateways operation to return a list of gateways for your account and region.
*
*/
private String gatewayARN;
/**
*
* The size, in bytes, of the virtual tapes that you want to create.
*
*
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*
*/
private Long tapeSizeInBytes;
/**
*
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
*
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*
*/
private String clientToken;
/**
*
* The number of virtual tapes that you want to create.
*
*/
private Integer numTapesToCreate;
/**
*
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode
* unique.
*
*
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*
*/
private String tapeBarcodePrefix;
/**
*
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon
* S3. Optional.
*
*/
private Boolean kMSEncrypted;
/**
*
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value can only
* be set when KMSEncrypted is true. Optional.
*
*/
private String kMSKey;
/**
*
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use the
* ListGateways operation to return a list of gateways for your account and region.
*
*
* @param gatewayARN
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use
* the ListGateways operation to return a list of gateways for your account and region.
*/
public void setGatewayARN(String gatewayARN) {
this.gatewayARN = gatewayARN;
}
/**
*
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use the
* ListGateways operation to return a list of gateways for your account and region.
*
*
* @return The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with.
* Use the ListGateways operation to return a list of gateways for your account and region.
*/
public String getGatewayARN() {
return this.gatewayARN;
}
/**
*
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use the
* ListGateways operation to return a list of gateways for your account and region.
*
*
* @param gatewayARN
* The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use
* the ListGateways operation to return a list of gateways for your account and region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withGatewayARN(String gatewayARN) {
setGatewayARN(gatewayARN);
return this;
}
/**
*
* The size, in bytes, of the virtual tapes that you want to create.
*
*
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*
*
* @param tapeSizeInBytes
* The size, in bytes, of the virtual tapes that you want to create.
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*/
public void setTapeSizeInBytes(Long tapeSizeInBytes) {
this.tapeSizeInBytes = tapeSizeInBytes;
}
/**
*
* The size, in bytes, of the virtual tapes that you want to create.
*
*
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*
*
* @return The size, in bytes, of the virtual tapes that you want to create.
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*/
public Long getTapeSizeInBytes() {
return this.tapeSizeInBytes;
}
/**
*
* The size, in bytes, of the virtual tapes that you want to create.
*
*
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
*
*
* @param tapeSizeInBytes
* The size, in bytes, of the virtual tapes that you want to create.
*
* The size must be aligned by gigabyte (1024*1024*1024 byte).
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withTapeSizeInBytes(Long tapeSizeInBytes) {
setTapeSizeInBytes(tapeSizeInBytes);
return this;
}
/**
*
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
*
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*
*
* @param clientToken
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
*
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*
*
* @return A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
*
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
*
*
* @param clientToken
* A unique identifier that you use to retry a request. If you retry a request, use the same
* ClientToken
you specified in the initial request.
*
* Using the same ClientToken
prevents creating the tape multiple times.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The number of virtual tapes that you want to create.
*
*
* @param numTapesToCreate
* The number of virtual tapes that you want to create.
*/
public void setNumTapesToCreate(Integer numTapesToCreate) {
this.numTapesToCreate = numTapesToCreate;
}
/**
*
* The number of virtual tapes that you want to create.
*
*
* @return The number of virtual tapes that you want to create.
*/
public Integer getNumTapesToCreate() {
return this.numTapesToCreate;
}
/**
*
* The number of virtual tapes that you want to create.
*
*
* @param numTapesToCreate
* The number of virtual tapes that you want to create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withNumTapesToCreate(Integer numTapesToCreate) {
setNumTapesToCreate(numTapesToCreate);
return this;
}
/**
*
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode
* unique.
*
*
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*
*
* @param tapeBarcodePrefix
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the
* barcode unique.
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*/
public void setTapeBarcodePrefix(String tapeBarcodePrefix) {
this.tapeBarcodePrefix = tapeBarcodePrefix;
}
/**
*
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode
* unique.
*
*
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*
*
* @return A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the
* barcode unique.
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*/
public String getTapeBarcodePrefix() {
return this.tapeBarcodePrefix;
}
/**
*
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode
* unique.
*
*
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
*
*
* @param tapeBarcodePrefix
* A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the
* barcode unique.
*
* The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withTapeBarcodePrefix(String tapeBarcodePrefix) {
setTapeBarcodePrefix(tapeBarcodePrefix);
return this;
}
/**
*
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon
* S3. Optional.
*
*
* @param kMSEncrypted
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by
* Amazon S3. Optional.
*/
public void setKMSEncrypted(Boolean kMSEncrypted) {
this.kMSEncrypted = kMSEncrypted;
}
/**
*
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon
* S3. Optional.
*
*
* @return True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by
* Amazon S3. Optional.
*/
public Boolean getKMSEncrypted() {
return this.kMSEncrypted;
}
/**
*
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon
* S3. Optional.
*
*
* @param kMSEncrypted
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by
* Amazon S3. Optional.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withKMSEncrypted(Boolean kMSEncrypted) {
setKMSEncrypted(kMSEncrypted);
return this;
}
/**
*
* True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon
* S3. Optional.
*
*
* @return True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by
* Amazon S3. Optional.
*/
public Boolean isKMSEncrypted() {
return this.kMSEncrypted;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value can only
* be set when KMSEncrypted is true. Optional.
*
*
* @param kMSKey
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value
* can only be set when KMSEncrypted is true. Optional.
*/
public void setKMSKey(String kMSKey) {
this.kMSKey = kMSKey;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value can only
* be set when KMSEncrypted is true. Optional.
*
*
* @return The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value
* can only be set when KMSEncrypted is true. Optional.
*/
public String getKMSKey() {
return this.kMSKey;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value can only
* be set when KMSEncrypted is true. Optional.
*
*
* @param kMSKey
* The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. This value
* can only be set when KMSEncrypted is true. Optional.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTapesRequest withKMSKey(String kMSKey) {
setKMSKey(kMSKey);
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: ").append(getGatewayARN()).append(",");
if (getTapeSizeInBytes() != null)
sb.append("TapeSizeInBytes: ").append(getTapeSizeInBytes()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getNumTapesToCreate() != null)
sb.append("NumTapesToCreate: ").append(getNumTapesToCreate()).append(",");
if (getTapeBarcodePrefix() != null)
sb.append("TapeBarcodePrefix: ").append(getTapeBarcodePrefix()).append(",");
if (getKMSEncrypted() != null)
sb.append("KMSEncrypted: ").append(getKMSEncrypted()).append(",");
if (getKMSKey() != null)
sb.append("KMSKey: ").append(getKMSKey());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateTapesRequest == false)
return false;
CreateTapesRequest other = (CreateTapesRequest) obj;
if (other.getGatewayARN() == null ^ this.getGatewayARN() == null)
return false;
if (other.getGatewayARN() != null && other.getGatewayARN().equals(this.getGatewayARN()) == false)
return false;
if (other.getTapeSizeInBytes() == null ^ this.getTapeSizeInBytes() == null)
return false;
if (other.getTapeSizeInBytes() != null && other.getTapeSizeInBytes().equals(this.getTapeSizeInBytes()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getNumTapesToCreate() == null ^ this.getNumTapesToCreate() == null)
return false;
if (other.getNumTapesToCreate() != null && other.getNumTapesToCreate().equals(this.getNumTapesToCreate()) == false)
return false;
if (other.getTapeBarcodePrefix() == null ^ this.getTapeBarcodePrefix() == null)
return false;
if (other.getTapeBarcodePrefix() != null && other.getTapeBarcodePrefix().equals(this.getTapeBarcodePrefix()) == false)
return false;
if (other.getKMSEncrypted() == null ^ this.getKMSEncrypted() == null)
return false;
if (other.getKMSEncrypted() != null && other.getKMSEncrypted().equals(this.getKMSEncrypted()) == false)
return false;
if (other.getKMSKey() == null ^ this.getKMSKey() == null)
return false;
if (other.getKMSKey() != null && other.getKMSKey().equals(this.getKMSKey()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGatewayARN() == null) ? 0 : getGatewayARN().hashCode());
hashCode = prime * hashCode + ((getTapeSizeInBytes() == null) ? 0 : getTapeSizeInBytes().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getNumTapesToCreate() == null) ? 0 : getNumTapesToCreate().hashCode());
hashCode = prime * hashCode + ((getTapeBarcodePrefix() == null) ? 0 : getTapeBarcodePrefix().hashCode());
hashCode = prime * hashCode + ((getKMSEncrypted() == null) ? 0 : getKMSEncrypted().hashCode());
hashCode = prime * hashCode + ((getKMSKey() == null) ? 0 : getKMSKey().hashCode());
return hashCode;
}
@Override
public CreateTapesRequest clone() {
return (CreateTapesRequest) super.clone();
}
}