AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutTargetsRequest.h
1
6#pragma once
7#include <aws/events/CloudWatchEvents_EXPORTS.h>
8#include <aws/events/CloudWatchEventsRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/events/model/Target.h>
12#include <utility>
13
14namespace Aws
15{
16namespace CloudWatchEvents
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_CLOUDWATCHEVENTS_API PutTargetsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "PutTargets"; }
33
34 AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override;
35
36 AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37
38
40
43 inline const Aws::String& GetRule() const { return m_rule; }
44 inline bool RuleHasBeenSet() const { return m_ruleHasBeenSet; }
45 template<typename RuleT = Aws::String>
46 void SetRule(RuleT&& value) { m_ruleHasBeenSet = true; m_rule = std::forward<RuleT>(value); }
47 template<typename RuleT = Aws::String>
48 PutTargetsRequest& WithRule(RuleT&& value) { SetRule(std::forward<RuleT>(value)); return *this;}
50
52
56 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
57 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
58 template<typename EventBusNameT = Aws::String>
59 void SetEventBusName(EventBusNameT&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::forward<EventBusNameT>(value); }
60 template<typename EventBusNameT = Aws::String>
61 PutTargetsRequest& WithEventBusName(EventBusNameT&& value) { SetEventBusName(std::forward<EventBusNameT>(value)); return *this;}
63
65
68 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
69 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
70 template<typename TargetsT = Aws::Vector<Target>>
71 void SetTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets = std::forward<TargetsT>(value); }
72 template<typename TargetsT = Aws::Vector<Target>>
73 PutTargetsRequest& WithTargets(TargetsT&& value) { SetTargets(std::forward<TargetsT>(value)); return *this;}
74 template<typename TargetsT = Target>
75 PutTargetsRequest& AddTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets.emplace_back(std::forward<TargetsT>(value)); return *this; }
77 private:
78
79 Aws::String m_rule;
80 bool m_ruleHasBeenSet = false;
81
82 Aws::String m_eventBusName;
83 bool m_eventBusNameHasBeenSet = false;
84
85 Aws::Vector<Target> m_targets;
86 bool m_targetsHasBeenSet = false;
87 };
88
89} // namespace Model
90} // namespace CloudWatchEvents
91} // namespace Aws
const Aws::Vector< Target > & GetTargets() const
AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_CLOUDWATCHEVENTS_API PutTargetsRequest()=default
PutTargetsRequest & WithRule(RuleT &&value)
PutTargetsRequest & WithEventBusName(EventBusNameT &&value)
AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override
PutTargetsRequest & AddTargets(TargetsT &&value)
virtual const char * GetServiceRequestName() const override
PutTargetsRequest & WithTargets(TargetsT &&value)
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