/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace FSx { namespace Model { /** */ class RestoreVolumeFromSnapshotRequest : public FSxRequest { public: AWS_FSX_API RestoreVolumeFromSnapshotRequest(); // 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 "RestoreVolumeFromSnapshot"; } AWS_FSX_API Aws::String SerializePayload() const override; AWS_FSX_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } inline RestoreVolumeFromSnapshotRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} inline RestoreVolumeFromSnapshotRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} inline RestoreVolumeFromSnapshotRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

The ID of the volume that you are restoring.

*/ inline const Aws::String& GetVolumeId() const{ return m_volumeId; } /** *

The ID of the volume that you are restoring.

*/ inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; } /** *

The ID of the volume that you are restoring.

*/ inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; } /** *

The ID of the volume that you are restoring.

*/ inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); } /** *

The ID of the volume that you are restoring.

*/ inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); } /** *

The ID of the volume that you are restoring.

*/ inline RestoreVolumeFromSnapshotRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;} /** *

The ID of the volume that you are restoring.

*/ inline RestoreVolumeFromSnapshotRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;} /** *

The ID of the volume that you are restoring.

*/ inline RestoreVolumeFromSnapshotRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} /** *

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The ID of the source snapshot. Specifies the snapshot that you are restoring * from.

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

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline const Aws::Vector& GetOptions() const{ return m_options; } /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline bool OptionsHasBeenSet() const { return m_optionsHasBeenSet; } /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline void SetOptions(const Aws::Vector& value) { m_optionsHasBeenSet = true; m_options = value; } /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline void SetOptions(Aws::Vector&& value) { m_optionsHasBeenSet = true; m_options = std::move(value); } /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline RestoreVolumeFromSnapshotRequest& WithOptions(const Aws::Vector& value) { SetOptions(value); return *this;} /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline RestoreVolumeFromSnapshotRequest& WithOptions(Aws::Vector&& value) { SetOptions(std::move(value)); return *this;} /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline RestoreVolumeFromSnapshotRequest& AddOptions(const RestoreOpenZFSVolumeOption& value) { m_optionsHasBeenSet = true; m_options.push_back(value); return *this; } /** *

The settings used when restoring the specified volume from snapshot.

    *
  • DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots between * the current state and the specified snapshot. If there are intermediate * snapshots and this option isn't used, RestoreVolumeFromSnapshot * fails.

  • DELETE_CLONED_VOLUMES - Deletes any * dependent clone volumes created from intermediate snapshots. If there are any * dependent clone volumes and this option isn't used, * RestoreVolumeFromSnapshot fails.

*/ inline RestoreVolumeFromSnapshotRequest& AddOptions(RestoreOpenZFSVolumeOption&& value) { m_optionsHasBeenSet = true; m_options.push_back(std::move(value)); return *this; } private: Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::String m_volumeId; bool m_volumeIdHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; Aws::Vector m_options; bool m_optionsHasBeenSet = false; }; } // namespace Model } // namespace FSx } // namespace Aws