/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace FIS { namespace Model { /** *

Describes an action. For more information, see FIS * actions in the Fault Injection Simulator User Guide.

See * Also:

AWS API * Reference

*/ class Action { public: AWS_FIS_API Action(); AWS_FIS_API Action(Aws::Utils::Json::JsonView jsonValue); AWS_FIS_API Action& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_FIS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The ID of the action.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the action.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the action.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the action.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the action.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the action.

*/ inline Action& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the action.

*/ inline Action& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the action.

*/ inline Action& WithId(const char* value) { SetId(value); return *this;} /** *

The description for the action.

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

The description for the action.

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

The description for the action.

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

The description for the action.

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

The description for the action.

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

The description for the action.

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

The description for the action.

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

The description for the action.

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

The action parameters, if applicable.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

The action parameters, if applicable.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The action parameters, if applicable.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The action parameters, if applicable.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The action parameters, if applicable.

*/ inline Action& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

The action parameters, if applicable.

*/ inline Action& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(const Aws::String& key, const ActionParameter& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(Aws::String&& key, const ActionParameter& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(const Aws::String& key, ActionParameter&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(Aws::String&& key, ActionParameter&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(const char* key, ActionParameter&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The action parameters, if applicable.

*/ inline Action& AddParameters(const char* key, const ActionParameter& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

The supported targets for the action.

*/ inline const Aws::Map& GetTargets() const{ return m_targets; } /** *

The supported targets for the action.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

The supported targets for the action.

*/ inline void SetTargets(const Aws::Map& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

The supported targets for the action.

*/ inline void SetTargets(Aws::Map&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

The supported targets for the action.

*/ inline Action& WithTargets(const Aws::Map& value) { SetTargets(value); return *this;} /** *

The supported targets for the action.

*/ inline Action& WithTargets(Aws::Map&& value) { SetTargets(std::move(value)); return *this;} /** *

The supported targets for the action.

*/ inline Action& AddTargets(const Aws::String& key, const ActionTarget& value) { m_targetsHasBeenSet = true; m_targets.emplace(key, value); return *this; } /** *

The supported targets for the action.

*/ inline Action& AddTargets(Aws::String&& key, const ActionTarget& value) { m_targetsHasBeenSet = true; m_targets.emplace(std::move(key), value); return *this; } /** *

The supported targets for the action.

*/ inline Action& AddTargets(const Aws::String& key, ActionTarget&& value) { m_targetsHasBeenSet = true; m_targets.emplace(key, std::move(value)); return *this; } /** *

The supported targets for the action.

*/ inline Action& AddTargets(Aws::String&& key, ActionTarget&& value) { m_targetsHasBeenSet = true; m_targets.emplace(std::move(key), std::move(value)); return *this; } /** *

The supported targets for the action.

*/ inline Action& AddTargets(const char* key, ActionTarget&& value) { m_targetsHasBeenSet = true; m_targets.emplace(key, std::move(value)); return *this; } /** *

The supported targets for the action.

*/ inline Action& AddTargets(const char* key, const ActionTarget& value) { m_targetsHasBeenSet = true; m_targets.emplace(key, value); return *this; } /** *

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

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

The tags for the action.

*/ inline Action& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Map m_parameters; bool m_parametersHasBeenSet = false; Aws::Map m_targets; bool m_targetsHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace FIS } // namespace Aws