/** * 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 Connect { namespace Model { /** */ class CreateRuleRequest : public ConnectRequest { public: AWS_CONNECT_API CreateRuleRequest(); // 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 "CreateRule"; } AWS_CONNECT_API Aws::String SerializePayload() const override; /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline CreateRuleRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline CreateRuleRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The identifier of the Amazon Connect instance. You can find * the instance ID in the Amazon Resource Name (ARN) of the instance.

*/ inline CreateRuleRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

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

A unique name for the rule.

*/ inline CreateRuleRequest& WithName(const char* value) { SetName(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 CreateRuleRequest& WithTriggerEventSource(const RuleTriggerEventSource& value) { SetTriggerEventSource(value); return *this;} /** *

The event source to trigger the rule.

*/ inline CreateRuleRequest& 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 CreateRuleRequest& WithFunction(const Aws::String& value) { SetFunction(value); return *this;} /** *

The conditions of the rule.

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

The conditions of the rule.

*/ inline CreateRuleRequest& 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 CreateRuleRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

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

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

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

*/ inline CreateRuleRequest& 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 CreateRuleRequest& 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 CreateRuleRequest& WithPublishStatus(const RulePublishStatus& value) { SetPublishStatus(value); return *this;} /** *

The publish status of the rule.

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

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline CreateRuleRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline CreateRuleRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. If not provided, the Amazon Web Services SDK * populates this field. For more information about idempotency, see Making * retries safe with idempotent APIs.

*/ inline CreateRuleRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = 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::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace Connect } // namespace Aws