AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
PutTargetsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/eventbridge/EventBridgeRequest.h>
10#include <aws/eventbridge/EventBridge_EXPORTS.h>
11#include <aws/eventbridge/model/Target.h>
12
13#include <utility>
14
15namespace Aws {
16namespace EventBridge {
17namespace Model {
18
22 public:
23 AWS_EVENTBRIDGE_API PutTargetsRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "PutTargets"; }
30
31 AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override;
32
33 AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
34
36
39 inline const Aws::String& GetRule() const { return m_rule; }
40 inline bool RuleHasBeenSet() const { return m_ruleHasBeenSet; }
41 template <typename RuleT = Aws::String>
42 void SetRule(RuleT&& value) {
43 m_ruleHasBeenSet = true;
44 m_rule = std::forward<RuleT>(value);
45 }
46 template <typename RuleT = Aws::String>
47 PutTargetsRequest& WithRule(RuleT&& value) {
48 SetRule(std::forward<RuleT>(value));
49 return *this;
50 }
52
54
58 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
59 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
60 template <typename EventBusNameT = Aws::String>
61 void SetEventBusName(EventBusNameT&& value) {
62 m_eventBusNameHasBeenSet = true;
63 m_eventBusName = std::forward<EventBusNameT>(value);
64 }
65 template <typename EventBusNameT = Aws::String>
66 PutTargetsRequest& WithEventBusName(EventBusNameT&& value) {
67 SetEventBusName(std::forward<EventBusNameT>(value));
68 return *this;
69 }
71
73
76 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
77 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
78 template <typename TargetsT = Aws::Vector<Target>>
79 void SetTargets(TargetsT&& value) {
80 m_targetsHasBeenSet = true;
81 m_targets = std::forward<TargetsT>(value);
82 }
83 template <typename TargetsT = Aws::Vector<Target>>
84 PutTargetsRequest& WithTargets(TargetsT&& value) {
85 SetTargets(std::forward<TargetsT>(value));
86 return *this;
87 }
88 template <typename TargetsT = Target>
89 PutTargetsRequest& AddTargets(TargetsT&& value) {
90 m_targetsHasBeenSet = true;
91 m_targets.emplace_back(std::forward<TargetsT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_rule;
97
98 Aws::String m_eventBusName;
99
100 Aws::Vector<Target> m_targets;
101 bool m_ruleHasBeenSet = false;
102 bool m_eventBusNameHasBeenSet = false;
103 bool m_targetsHasBeenSet = false;
104};
105
106} // namespace Model
107} // namespace EventBridge
108} // namespace Aws
PutTargetsRequest & AddTargets(TargetsT &&value)
void SetEventBusName(EventBusNameT &&value)
PutTargetsRequest & WithRule(RuleT &&value)
PutTargetsRequest & WithTargets(TargetsT &&value)
AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Vector< Target > & GetTargets() const
AWS_EVENTBRIDGE_API PutTargetsRequest()=default
PutTargetsRequest & WithEventBusName(EventBusNameT &&value)
AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override
const Aws::String & GetEventBusName() const
virtual const char * GetServiceRequestName() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector