/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EBS { namespace Model { /** */ class PutSnapshotBlockRequest : public StreamingEBSRequest { public: AWS_EBS_API PutSnapshotBlockRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutSnapshotBlock"; } AWS_EBS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; AWS_EBS_API bool SignBody() const override { return false; } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); } /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline PutSnapshotBlockRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline PutSnapshotBlockRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;} /** *

The ID of the snapshot.

If the specified snapshot is * encrypted, you must have permission to use the KMS key that was used to encrypt * the snapshot. For more information, see * Using encryption in the Amazon Elastic Compute Cloud User Guide..

* */ inline PutSnapshotBlockRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;} /** *

The block index of the block in which to write the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline int GetBlockIndex() const{ return m_blockIndex; } /** *

The block index of the block in which to write the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline bool BlockIndexHasBeenSet() const { return m_blockIndexHasBeenSet; } /** *

The block index of the block in which to write the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline void SetBlockIndex(int value) { m_blockIndexHasBeenSet = true; m_blockIndex = value; } /** *

The block index of the block in which to write the data. A block index is a * logical index in units of 512 KiB blocks. To identify the block * index, divide the logical offset of the data in the logical volume by the block * size (logical offset of data/524288). The logical offset of the * data must be 512 KiB aligned.

*/ inline PutSnapshotBlockRequest& WithBlockIndex(int value) { SetBlockIndex(value); return *this;} /** *

The size of the data to write to the block, in bytes. Currently, the only * supported size is 524288 bytes.

Valid values: * 524288

*/ inline int GetDataLength() const{ return m_dataLength; } /** *

The size of the data to write to the block, in bytes. Currently, the only * supported size is 524288 bytes.

Valid values: * 524288

*/ inline bool DataLengthHasBeenSet() const { return m_dataLengthHasBeenSet; } /** *

The size of the data to write to the block, in bytes. Currently, the only * supported size is 524288 bytes.

Valid values: * 524288

*/ inline void SetDataLength(int value) { m_dataLengthHasBeenSet = true; m_dataLength = value; } /** *

The size of the data to write to the block, in bytes. Currently, the only * supported size is 524288 bytes.

Valid values: * 524288

*/ inline PutSnapshotBlockRequest& WithDataLength(int value) { SetDataLength(value); return *this;} /** *

The progress of the write process, as a percentage.

*/ inline int GetProgress() const{ return m_progress; } /** *

The progress of the write process, as a percentage.

*/ inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; } /** *

The progress of the write process, as a percentage.

*/ inline void SetProgress(int value) { m_progressHasBeenSet = true; m_progress = value; } /** *

The progress of the write process, as a percentage.

*/ inline PutSnapshotBlockRequest& WithProgress(int value) { SetProgress(value); return *this;} /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline const Aws::String& GetChecksum() const{ return m_checksum; } /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline bool ChecksumHasBeenSet() const { return m_checksumHasBeenSet; } /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline void SetChecksum(const Aws::String& value) { m_checksumHasBeenSet = true; m_checksum = value; } /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline void SetChecksum(Aws::String&& value) { m_checksumHasBeenSet = true; m_checksum = std::move(value); } /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline void SetChecksum(const char* value) { m_checksumHasBeenSet = true; m_checksum.assign(value); } /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline PutSnapshotBlockRequest& WithChecksum(const Aws::String& value) { SetChecksum(value); return *this;} /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline PutSnapshotBlockRequest& WithChecksum(Aws::String&& value) { SetChecksum(std::move(value)); return *this;} /** *

A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are * supported.

*/ inline PutSnapshotBlockRequest& WithChecksum(const char* value) { SetChecksum(value); return *this;} /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline const ChecksumAlgorithm& GetChecksumAlgorithm() const{ return m_checksumAlgorithm; } /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; } /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline void SetChecksumAlgorithm(const ChecksumAlgorithm& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; } /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline void SetChecksumAlgorithm(ChecksumAlgorithm&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::move(value); } /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline PutSnapshotBlockRequest& WithChecksumAlgorithm(const ChecksumAlgorithm& value) { SetChecksumAlgorithm(value); return *this;} /** *

The algorithm used to generate the checksum. Currently, the only supported * algorithm is SHA256.

*/ inline PutSnapshotBlockRequest& WithChecksumAlgorithm(ChecksumAlgorithm&& value) { SetChecksumAlgorithm(std::move(value)); return *this;} private: Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; int m_blockIndex; bool m_blockIndexHasBeenSet = false; int m_dataLength; bool m_dataLengthHasBeenSet = false; int m_progress; bool m_progressHasBeenSet = false; Aws::String m_checksum; bool m_checksumHasBeenSet = false; ChecksumAlgorithm m_checksumAlgorithm; bool m_checksumAlgorithmHasBeenSet = false; }; } // namespace Model } // namespace EBS } // namespace Aws