/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class RestoreSnapshotTierRequest : public EC2Request { public: AWS_EC2_API RestoreSnapshotTierRequest(); // 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 "RestoreSnapshotTier"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

The ID of the snapshot to restore.

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

Specifies the number of days for which to temporarily restore an archived * snapshot. Required for temporary restores only. The snapshot will be * automatically re-archived after this period.

To temporarily restore an * archived snapshot, specify the number of days and omit the * PermanentRestore parameter or set it to false.

*/ inline int GetTemporaryRestoreDays() const{ return m_temporaryRestoreDays; } /** *

Specifies the number of days for which to temporarily restore an archived * snapshot. Required for temporary restores only. The snapshot will be * automatically re-archived after this period.

To temporarily restore an * archived snapshot, specify the number of days and omit the * PermanentRestore parameter or set it to false.

*/ inline bool TemporaryRestoreDaysHasBeenSet() const { return m_temporaryRestoreDaysHasBeenSet; } /** *

Specifies the number of days for which to temporarily restore an archived * snapshot. Required for temporary restores only. The snapshot will be * automatically re-archived after this period.

To temporarily restore an * archived snapshot, specify the number of days and omit the * PermanentRestore parameter or set it to false.

*/ inline void SetTemporaryRestoreDays(int value) { m_temporaryRestoreDaysHasBeenSet = true; m_temporaryRestoreDays = value; } /** *

Specifies the number of days for which to temporarily restore an archived * snapshot. Required for temporary restores only. The snapshot will be * automatically re-archived after this period.

To temporarily restore an * archived snapshot, specify the number of days and omit the * PermanentRestore parameter or set it to false.

*/ inline RestoreSnapshotTierRequest& WithTemporaryRestoreDays(int value) { SetTemporaryRestoreDays(value); return *this;} /** *

Indicates whether to permanently restore an archived snapshot. To permanently * restore an archived snapshot, specify true and omit the * RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.

*/ inline bool GetPermanentRestore() const{ return m_permanentRestore; } /** *

Indicates whether to permanently restore an archived snapshot. To permanently * restore an archived snapshot, specify true and omit the * RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.

*/ inline bool PermanentRestoreHasBeenSet() const { return m_permanentRestoreHasBeenSet; } /** *

Indicates whether to permanently restore an archived snapshot. To permanently * restore an archived snapshot, specify true and omit the * RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.

*/ inline void SetPermanentRestore(bool value) { m_permanentRestoreHasBeenSet = true; m_permanentRestore = value; } /** *

Indicates whether to permanently restore an archived snapshot. To permanently * restore an archived snapshot, specify true and omit the * RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.

*/ inline RestoreSnapshotTierRequest& WithPermanentRestore(bool value) { SetPermanentRestore(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline RestoreSnapshotTierRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; int m_temporaryRestoreDays; bool m_temporaryRestoreDaysHasBeenSet = false; bool m_permanentRestore; bool m_permanentRestoreHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws