/* * Copyright 2018-2023 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.ebs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

*/ private Long volumeSize; /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an * on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to encrypt * the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
*/ private String parentSnapshotId; /** *

* The tags to apply to the snapshot. *

*/ private java.util.List tags; /** *

* A description for the snapshot. *

*/ private String description; /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the result from the original successful * request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

*/ private String clientToken; /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
*/ private Boolean encrypted; /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
*/ private String kmsKeyArn; /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

* *

* If no value is specified, the timeout defaults to 60 minutes. *

*/ private Integer timeout; /** *

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

* * @param volumeSize * The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). */ public void setVolumeSize(Long volumeSize) { this.volumeSize = volumeSize; } /** *

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

* * @return The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). */ public Long getVolumeSize() { return this.volumeSize; } /** *

* The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). *

* * @param volumeSize * The size of the volume, in GiB. The maximum size is 65536 GiB (64 TiB). * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withVolumeSize(Long volumeSize) { setVolumeSize(volumeSize); return this; } /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an * on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to encrypt * the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param parentSnapshotId * The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot * for an on-premises volume, omit this parameter.

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to * encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public void setParentSnapshotId(String parentSnapshotId) { this.parentSnapshotId = parentSnapshotId; } /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an * on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to encrypt * the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot * for an on-premises volume, omit this parameter.

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to * encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public String getParentSnapshotId() { return this.parentSnapshotId; } /** *

* The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an * on-premises volume, omit this parameter. *

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to encrypt * the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param parentSnapshotId * The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot * for an on-premises volume, omit this parameter.

*

* You can't specify ParentSnapshotId and Encrypted in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* If you specify an encrypted parent snapshot, you must have permission to use the KMS key that was used to * encrypt the parent snapshot. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withParentSnapshotId(String parentSnapshotId) { setParentSnapshotId(parentSnapshotId); return this; } /** *

* The tags to apply to the snapshot. *

* * @return The tags to apply to the snapshot. */ public java.util.List getTags() { return tags; } /** *

* The tags to apply to the snapshot. *

* * @param tags * The tags to apply to the snapshot. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* The tags to apply to the snapshot. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * The tags to apply to the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags to apply to the snapshot. *

* * @param tags * The tags to apply to the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* A description for the snapshot. *

* * @param description * A description for the snapshot. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the snapshot. *

* * @return A description for the snapshot. */ public String getDescription() { return this.description; } /** *

* A description for the snapshot. *

* * @param description * A description for the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withDescription(String description) { setDescription(description); return this; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the result from the original successful * request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request * completes successfully. The subsequent retries with the same client token return the result from the * original successful request and they have no additional effect.

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency * for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the result from the original successful * request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

* * @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * Idempotency ensures that an API request completes only once. With an idempotent request, if the original * request completes successfully. The subsequent retries with the same client token return the result from * the original successful request and they have no additional effect.

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency * for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. */ public String getClientToken() { return this.clientToken; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request completes * successfully. The subsequent retries with the same client token return the result from the original successful * request and they have no additional effect. *

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency for * StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency * ensures that an API request completes only once. With an idempotent request, if the original request * completes successfully. The subsequent retries with the same client token return the result from the * original successful request and they have no additional effect.

*

* If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK. *

*

* For more information, see Idempotency * for StartSnapshot API in the Amazon Elastic Compute Cloud User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param encrypted * Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public Boolean getEncrypted() { return this.encrypted; } /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param encrypted * Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withEncrypted(Boolean encrypted) { setEncrypted(encrypted); return this; } /** *

* Indicates whether to encrypt the snapshot. *

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return Indicates whether to encrypt the snapshot.

*

* You can't specify Encrypted and ParentSnapshotId in the same request. If you specify both * parameters, the request fails with ValidationException. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public Boolean isEncrypted() { return this.encrypted; } /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param kmsKeyArn * The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the * snapshot.

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public void setKmsKeyArn(String kmsKeyArn) { this.kmsKeyArn = kmsKeyArn; } /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @return The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the * snapshot.

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled * for * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*/ public String getKmsKeyArn() { return this.kmsKeyArn; } /** *

* The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the snapshot. *

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for encryption * by default. For more information, see Using encryption in * the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

*
* * @param kmsKeyArn * The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to be used to encrypt the * snapshot.

*

* The encryption status of the snapshot depends on the values that you specify for Encrypted, * KmsKeyArn, and ParentSnapshotId, and whether your Amazon Web Services account is enabled for * * encryption by default. For more information, see Using * encryption in the Amazon Elastic Compute Cloud User Guide. *

* *

* To create an encrypted snapshot, you must have permission to use the KMS key. For more information, see * Permissions to use Key Management Service keys in the Amazon Elastic Compute Cloud User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withKmsKeyArn(String kmsKeyArn) { setKmsKeyArn(kmsKeyArn); return this; } /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. *

* * @param timeout * The amount of time (in minutes) after which the snapshot is automatically cancelled if:

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. *

* * @return The amount of time (in minutes) after which the snapshot is automatically cancelled if:

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. */ public Integer getTimeout() { return this.timeout; } /** *

* The amount of time (in minutes) after which the snapshot is automatically cancelled if: *

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. *

* * @param timeout * The amount of time (in minutes) after which the snapshot is automatically cancelled if:

*
    *
  • *

    * No blocks are written to the snapshot. *

    *
  • *
  • *

    * The snapshot is not completed after writing the last block of data. *

    *
  • *
*

* If no value is specified, the timeout defaults to 60 minutes. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSnapshotRequest withTimeout(Integer timeout) { setTimeout(timeout); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVolumeSize() != null) sb.append("VolumeSize: ").append(getVolumeSize()).append(","); if (getParentSnapshotId() != null) sb.append("ParentSnapshotId: ").append(getParentSnapshotId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getEncrypted() != null) sb.append("Encrypted: ").append(getEncrypted()).append(","); if (getKmsKeyArn() != null) sb.append("KmsKeyArn: ").append("***Sensitive Data Redacted***").append(","); if (getTimeout() != null) sb.append("Timeout: ").append(getTimeout()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartSnapshotRequest == false) return false; StartSnapshotRequest other = (StartSnapshotRequest) obj; if (other.getVolumeSize() == null ^ this.getVolumeSize() == null) return false; if (other.getVolumeSize() != null && other.getVolumeSize().equals(this.getVolumeSize()) == false) return false; if (other.getParentSnapshotId() == null ^ this.getParentSnapshotId() == null) return false; if (other.getParentSnapshotId() != null && other.getParentSnapshotId().equals(this.getParentSnapshotId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getEncrypted() == null ^ this.getEncrypted() == null) return false; if (other.getEncrypted() != null && other.getEncrypted().equals(this.getEncrypted()) == false) return false; if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null) return false; if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false) return false; if (other.getTimeout() == null ^ this.getTimeout() == null) return false; if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeSize() == null) ? 0 : getVolumeSize().hashCode()); hashCode = prime * hashCode + ((getParentSnapshotId() == null) ? 0 : getParentSnapshotId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode()); hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode()); hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode()); return hashCode; } @Override public StartSnapshotRequest clone() { return (StartSnapshotRequest) super.clone(); } }