/** * 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 Backup { namespace Model { /** */ class CreateLegalHoldRequest : public BackupRequest { public: AWS_BACKUP_API CreateLegalHoldRequest(); // 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 "CreateLegalHold"; } AWS_BACKUP_API Aws::String SerializePayload() const override; /** *

This is the string title of the legal hold.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

This is the string title of the legal hold.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

This is the string title of the legal hold.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

This is the string title of the legal hold.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

This is the string title of the legal hold.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

This is the string title of the legal hold.

*/ inline CreateLegalHoldRequest& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

This is the string title of the legal hold.

*/ inline CreateLegalHoldRequest& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

This is the string title of the legal hold.

*/ inline CreateLegalHoldRequest& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

This is the string description of the legal hold.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

This is the string description of the legal hold.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

This is the string description of the legal hold.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

This is the string description of the legal hold.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

This is the string description of the legal hold.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

This is the string description of the legal hold.

*/ inline CreateLegalHoldRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

This is the string description of the legal hold.

*/ inline CreateLegalHoldRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

This is the string description of the legal hold.

*/ inline CreateLegalHoldRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline const Aws::String& GetIdempotencyToken() const{ return m_idempotencyToken; } /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline bool IdempotencyTokenHasBeenSet() const { return m_idempotencyTokenHasBeenSet; } /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline void SetIdempotencyToken(const Aws::String& value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken = value; } /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline void SetIdempotencyToken(Aws::String&& value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken = std::move(value); } /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline void SetIdempotencyToken(const char* value) { m_idempotencyTokenHasBeenSet = true; m_idempotencyToken.assign(value); } /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline CreateLegalHoldRequest& WithIdempotencyToken(const Aws::String& value) { SetIdempotencyToken(value); return *this;} /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline CreateLegalHoldRequest& WithIdempotencyToken(Aws::String&& value) { SetIdempotencyToken(std::move(value)); return *this;} /** *

This is a user-chosen string used to distinguish between otherwise identical * calls. Retrying a successful request with the same idempotency token results in * a success message with no action taken.

*/ inline CreateLegalHoldRequest& WithIdempotencyToken(const char* value) { SetIdempotencyToken(value); return *this;} /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline const RecoveryPointSelection& GetRecoveryPointSelection() const{ return m_recoveryPointSelection; } /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline bool RecoveryPointSelectionHasBeenSet() const { return m_recoveryPointSelectionHasBeenSet; } /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline void SetRecoveryPointSelection(const RecoveryPointSelection& value) { m_recoveryPointSelectionHasBeenSet = true; m_recoveryPointSelection = value; } /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline void SetRecoveryPointSelection(RecoveryPointSelection&& value) { m_recoveryPointSelectionHasBeenSet = true; m_recoveryPointSelection = std::move(value); } /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline CreateLegalHoldRequest& WithRecoveryPointSelection(const RecoveryPointSelection& value) { SetRecoveryPointSelection(value); return *this;} /** *

This specifies criteria to assign a set of resources, such as resource types * or backup vaults.

*/ inline CreateLegalHoldRequest& WithRecoveryPointSelection(RecoveryPointSelection&& value) { SetRecoveryPointSelection(std::move(value)); return *this;} /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

Optional tags to include. A tag is a key-value pair you can use to manage, * filter, and search for your resources. Allowed characters include UTF-8 letters, * numbers, spaces, and the following characters: + - = . _ : /.

*/ inline CreateLegalHoldRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_title; bool m_titleHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_idempotencyToken; bool m_idempotencyTokenHasBeenSet = false; RecoveryPointSelection m_recoveryPointSelection; bool m_recoveryPointSelectionHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Backup } // namespace Aws