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

Information about a rule.

See Also:

AWS API * Reference

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

The name of the rule.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the rule.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the rule.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the rule.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the rule.

*/ inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the rule.

*/ inline Rule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the rule.

*/ inline Rule& WithName(const char* value) { SetName(value); return *this;} /** *

A unique identifier for the rule.

*/ inline const Aws::String& GetRuleId() const{ return m_ruleId; } /** *

A unique identifier for the rule.

*/ inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; } /** *

A unique identifier for the rule.

*/ inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; } /** *

A unique identifier for the rule.

*/ inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); } /** *

A unique identifier for the rule.

*/ inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); } /** *

A unique identifier for the rule.

*/ inline Rule& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;} /** *

A unique identifier for the rule.

*/ inline Rule& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;} /** *

A unique identifier for the rule.

*/ inline Rule& WithRuleId(const char* value) { SetRuleId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline const Aws::String& GetRuleArn() const{ return m_ruleArn; } /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline bool RuleArnHasBeenSet() const { return m_ruleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleArn(const Aws::String& value) { m_ruleArnHasBeenSet = true; m_ruleArn = value; } /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleArn(Aws::String&& value) { m_ruleArnHasBeenSet = true; m_ruleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleArn(const char* value) { m_ruleArnHasBeenSet = true; m_ruleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline Rule& WithRuleArn(const Aws::String& value) { SetRuleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline Rule& WithRuleArn(Aws::String&& value) { SetRuleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the rule.

*/ inline Rule& WithRuleArn(const char* value) { SetRuleArn(value); return *this;} /** *

The event source to trigger the rule.

*/ inline const RuleTriggerEventSource& GetTriggerEventSource() const{ return m_triggerEventSource; } /** *

The event source to trigger the rule.

*/ inline bool TriggerEventSourceHasBeenSet() const { return m_triggerEventSourceHasBeenSet; } /** *

The event source to trigger the rule.

*/ inline void SetTriggerEventSource(const RuleTriggerEventSource& value) { m_triggerEventSourceHasBeenSet = true; m_triggerEventSource = value; } /** *

The event source to trigger the rule.

*/ inline void SetTriggerEventSource(RuleTriggerEventSource&& value) { m_triggerEventSourceHasBeenSet = true; m_triggerEventSource = std::move(value); } /** *

The event source to trigger the rule.

*/ inline Rule& WithTriggerEventSource(const RuleTriggerEventSource& value) { SetTriggerEventSource(value); return *this;} /** *

The event source to trigger the rule.

*/ inline Rule& WithTriggerEventSource(RuleTriggerEventSource&& value) { SetTriggerEventSource(std::move(value)); return *this;} /** *

The conditions of the rule.

*/ inline const Aws::String& GetFunction() const{ return m_function; } /** *

The conditions of the rule.

*/ inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; } /** *

The conditions of the rule.

*/ inline void SetFunction(const Aws::String& value) { m_functionHasBeenSet = true; m_function = value; } /** *

The conditions of the rule.

*/ inline void SetFunction(Aws::String&& value) { m_functionHasBeenSet = true; m_function = std::move(value); } /** *

The conditions of the rule.

*/ inline void SetFunction(const char* value) { m_functionHasBeenSet = true; m_function.assign(value); } /** *

The conditions of the rule.

*/ inline Rule& WithFunction(const Aws::String& value) { SetFunction(value); return *this;} /** *

The conditions of the rule.

*/ inline Rule& WithFunction(Aws::String&& value) { SetFunction(std::move(value)); return *this;} /** *

The conditions of the rule.

*/ inline Rule& WithFunction(const char* value) { SetFunction(value); return *this;} /** *

A list of actions to be run when the rule is triggered.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

A list of actions to be run when the rule is triggered.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

A list of actions to be run when the rule is triggered.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

A list of actions to be run when the rule is triggered.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

A list of actions to be run when the rule is triggered.

*/ inline Rule& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

A list of actions to be run when the rule is triggered.

*/ inline Rule& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

A list of actions to be run when the rule is triggered.

*/ inline Rule& AddActions(const RuleAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

A list of actions to be run when the rule is triggered.

*/ inline Rule& AddActions(RuleAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } /** *

The publish status of the rule.

*/ inline const RulePublishStatus& GetPublishStatus() const{ return m_publishStatus; } /** *

The publish status of the rule.

*/ inline bool PublishStatusHasBeenSet() const { return m_publishStatusHasBeenSet; } /** *

The publish status of the rule.

*/ inline void SetPublishStatus(const RulePublishStatus& value) { m_publishStatusHasBeenSet = true; m_publishStatus = value; } /** *

The publish status of the rule.

*/ inline void SetPublishStatus(RulePublishStatus&& value) { m_publishStatusHasBeenSet = true; m_publishStatus = std::move(value); } /** *

The publish status of the rule.

*/ inline Rule& WithPublishStatus(const RulePublishStatus& value) { SetPublishStatus(value); return *this;} /** *

The publish status of the rule.

*/ inline Rule& WithPublishStatus(RulePublishStatus&& value) { SetPublishStatus(std::move(value)); return *this;} /** *

The timestamp for when the rule was created.

*/ inline const Aws::Utils::DateTime& GetCreatedTime() const{ return m_createdTime; } /** *

The timestamp for when the rule was created.

*/ inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; } /** *

The timestamp for when the rule was created.

*/ inline void SetCreatedTime(const Aws::Utils::DateTime& value) { m_createdTimeHasBeenSet = true; m_createdTime = value; } /** *

The timestamp for when the rule was created.

*/ inline void SetCreatedTime(Aws::Utils::DateTime&& value) { m_createdTimeHasBeenSet = true; m_createdTime = std::move(value); } /** *

The timestamp for when the rule was created.

*/ inline Rule& WithCreatedTime(const Aws::Utils::DateTime& value) { SetCreatedTime(value); return *this;} /** *

The timestamp for when the rule was created.

*/ inline Rule& WithCreatedTime(Aws::Utils::DateTime&& value) { SetCreatedTime(std::move(value)); return *this;} /** *

The timestamp for the when the rule was last updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTime() const{ return m_lastUpdatedTime; } /** *

The timestamp for the when the rule was last updated.

*/ inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; } /** *

The timestamp for the when the rule was last updated.

*/ inline void SetLastUpdatedTime(const Aws::Utils::DateTime& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; } /** *

The timestamp for the when the rule was last updated.

*/ inline void SetLastUpdatedTime(Aws::Utils::DateTime&& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = std::move(value); } /** *

The timestamp for the when the rule was last updated.

*/ inline Rule& WithLastUpdatedTime(const Aws::Utils::DateTime& value) { SetLastUpdatedTime(value); return *this;} /** *

The timestamp for the when the rule was last updated.

*/ inline Rule& WithLastUpdatedTime(Aws::Utils::DateTime&& value) { SetLastUpdatedTime(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline const Aws::String& GetLastUpdatedBy() const{ return m_lastUpdatedBy; } /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline bool LastUpdatedByHasBeenSet() const { return m_lastUpdatedByHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline void SetLastUpdatedBy(const Aws::String& value) { m_lastUpdatedByHasBeenSet = true; m_lastUpdatedBy = value; } /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline void SetLastUpdatedBy(Aws::String&& value) { m_lastUpdatedByHasBeenSet = true; m_lastUpdatedBy = std::move(value); } /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline void SetLastUpdatedBy(const char* value) { m_lastUpdatedByHasBeenSet = true; m_lastUpdatedBy.assign(value); } /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline Rule& WithLastUpdatedBy(const Aws::String& value) { SetLastUpdatedBy(value); return *this;} /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline Rule& WithLastUpdatedBy(Aws::String&& value) { SetLastUpdatedBy(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the user who last updated the rule.

*/ inline Rule& WithLastUpdatedBy(const char* value) { SetLastUpdatedBy(value); return *this;} /** *

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

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

The tags used to organize, track, or control access for this resource. For * example, { "tags": {"key1":"value1", "key2":"value2"} }.

*/ inline Rule& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_ruleId; bool m_ruleIdHasBeenSet = false; Aws::String m_ruleArn; bool m_ruleArnHasBeenSet = false; RuleTriggerEventSource m_triggerEventSource; bool m_triggerEventSourceHasBeenSet = false; Aws::String m_function; bool m_functionHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; RulePublishStatus m_publishStatus; bool m_publishStatusHasBeenSet = false; Aws::Utils::DateTime m_createdTime; bool m_createdTimeHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedTime; bool m_lastUpdatedTimeHasBeenSet = false; Aws::String m_lastUpdatedBy; bool m_lastUpdatedByHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Connect } // namespace Aws