AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutRuleRequest.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/events/model/RuleState.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/events/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace CloudWatchEvents
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_CLOUDWATCHEVENTS_API PutRuleRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "PutRule"; }
34
35 AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override;
36
37 AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38
39
41
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template<typename NameT = Aws::String>
47 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
48 template<typename NameT = Aws::String>
49 PutRuleRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
51
53
57 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
58 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
59 template<typename ScheduleExpressionT = Aws::String>
60 void SetScheduleExpression(ScheduleExpressionT&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::forward<ScheduleExpressionT>(value); }
61 template<typename ScheduleExpressionT = Aws::String>
62 PutRuleRequest& WithScheduleExpression(ScheduleExpressionT&& value) { SetScheduleExpression(std::forward<ScheduleExpressionT>(value)); return *this;}
64
66
71 inline const Aws::String& GetEventPattern() const { return m_eventPattern; }
72 inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; }
73 template<typename EventPatternT = Aws::String>
74 void SetEventPattern(EventPatternT&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = std::forward<EventPatternT>(value); }
75 template<typename EventPatternT = Aws::String>
76 PutRuleRequest& WithEventPattern(EventPatternT&& value) { SetEventPattern(std::forward<EventPatternT>(value)); return *this;}
78
80
83 inline RuleState GetState() const { return m_state; }
84 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
85 inline void SetState(RuleState value) { m_stateHasBeenSet = true; m_state = value; }
86 inline PutRuleRequest& WithState(RuleState value) { SetState(value); return *this;}
88
90
93 inline const Aws::String& GetDescription() const { return m_description; }
94 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
95 template<typename DescriptionT = Aws::String>
96 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
97 template<typename DescriptionT = Aws::String>
98 PutRuleRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
100
102
110 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
111 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
112 template<typename RoleArnT = Aws::String>
113 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
114 template<typename RoleArnT = Aws::String>
115 PutRuleRequest& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
117
119
122 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
123 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
124 template<typename TagsT = Aws::Vector<Tag>>
125 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
126 template<typename TagsT = Aws::Vector<Tag>>
127 PutRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
128 template<typename TagsT = Tag>
129 PutRuleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
131
133
137 inline const Aws::String& GetEventBusName() const { return m_eventBusName; }
138 inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; }
139 template<typename EventBusNameT = Aws::String>
140 void SetEventBusName(EventBusNameT&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::forward<EventBusNameT>(value); }
141 template<typename EventBusNameT = Aws::String>
142 PutRuleRequest& WithEventBusName(EventBusNameT&& value) { SetEventBusName(std::forward<EventBusNameT>(value)); return *this;}
144 private:
145
146 Aws::String m_name;
147 bool m_nameHasBeenSet = false;
148
149 Aws::String m_scheduleExpression;
150 bool m_scheduleExpressionHasBeenSet = false;
151
152 Aws::String m_eventPattern;
153 bool m_eventPatternHasBeenSet = false;
154
156 bool m_stateHasBeenSet = false;
157
158 Aws::String m_description;
159 bool m_descriptionHasBeenSet = false;
160
161 Aws::String m_roleArn;
162 bool m_roleArnHasBeenSet = false;
163
164 Aws::Vector<Tag> m_tags;
165 bool m_tagsHasBeenSet = false;
166
167 Aws::String m_eventBusName;
168 bool m_eventBusNameHasBeenSet = false;
169 };
170
171} // namespace Model
172} // namespace CloudWatchEvents
173} // namespace Aws
PutRuleRequest & WithState(RuleState value)
PutRuleRequest & WithEventPattern(EventPatternT &&value)
const Aws::Vector< Tag > & GetTags() const
AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetDescription() const
const Aws::String & GetScheduleExpression() const
const Aws::String & GetEventPattern() const
virtual const char * GetServiceRequestName() const override
PutRuleRequest & AddTags(TagsT &&value)
PutRuleRequest & WithTags(TagsT &&value)
PutRuleRequest & WithRoleArn(RoleArnT &&value)
PutRuleRequest & WithName(NameT &&value)
void SetScheduleExpression(ScheduleExpressionT &&value)
AWS_CLOUDWATCHEVENTS_API PutRuleRequest()=default
const Aws::String & GetEventBusName() const
PutRuleRequest & WithDescription(DescriptionT &&value)
void SetEventBusName(EventBusNameT &&value)
AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override
PutRuleRequest & WithEventBusName(EventBusNameT &&value)
void SetEventPattern(EventPatternT &&value)
PutRuleRequest & WithScheduleExpression(ScheduleExpressionT &&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