/** * 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 EventBridge { namespace Model { /** */ class PutTargetsRequest : public EventBridgeRequest { public: AWS_EVENTBRIDGE_API PutTargetsRequest(); // 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 "PutTargets"; } AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override; AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the rule.

*/ inline const Aws::String& GetRule() const{ return m_rule; } /** *

The name of the rule.

*/ inline bool RuleHasBeenSet() const { return m_ruleHasBeenSet; } /** *

The name of the rule.

*/ inline void SetRule(const Aws::String& value) { m_ruleHasBeenSet = true; m_rule = value; } /** *

The name of the rule.

*/ inline void SetRule(Aws::String&& value) { m_ruleHasBeenSet = true; m_rule = std::move(value); } /** *

The name of the rule.

*/ inline void SetRule(const char* value) { m_ruleHasBeenSet = true; m_rule.assign(value); } /** *

The name of the rule.

*/ inline PutTargetsRequest& WithRule(const Aws::String& value) { SetRule(value); return *this;} /** *

The name of the rule.

*/ inline PutTargetsRequest& WithRule(Aws::String&& value) { SetRule(std::move(value)); return *this;} /** *

The name of the rule.

*/ inline PutTargetsRequest& WithRule(const char* value) { SetRule(value); return *this;} /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline const Aws::String& GetEventBusName() const{ return m_eventBusName; } /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; } /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline void SetEventBusName(const Aws::String& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = value; } /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline void SetEventBusName(Aws::String&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::move(value); } /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline void SetEventBusName(const char* value) { m_eventBusNameHasBeenSet = true; m_eventBusName.assign(value); } /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline PutTargetsRequest& WithEventBusName(const Aws::String& value) { SetEventBusName(value); return *this;} /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline PutTargetsRequest& WithEventBusName(Aws::String&& value) { SetEventBusName(std::move(value)); return *this;} /** *

The name or ARN of the event bus associated with the rule. If you omit this, * the default event bus is used.

*/ inline PutTargetsRequest& WithEventBusName(const char* value) { SetEventBusName(value); return *this;} /** *

The targets to update or add to the rule.

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

The targets to update or add to the rule.

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

The targets to update or add to the rule.

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

The targets to update or add to the rule.

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

The targets to update or add to the rule.

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

The targets to update or add to the rule.

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

The targets to update or add to the rule.

*/ inline PutTargetsRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

The targets to update or add to the rule.

*/ inline PutTargetsRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } private: Aws::String m_rule; bool m_ruleHasBeenSet = false; Aws::String m_eventBusName; bool m_eventBusNameHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; }; } // namespace Model } // namespace EventBridge } // namespace Aws