AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateRuleRequest.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/rbin/RecycleBinRequest.h>
10#include <aws/rbin/RecycleBin_EXPORTS.h>
11#include <aws/rbin/model/LockConfiguration.h>
12#include <aws/rbin/model/ResourceTag.h>
13#include <aws/rbin/model/ResourceType.h>
14#include <aws/rbin/model/RetentionPeriod.h>
15#include <aws/rbin/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace RecycleBin {
21namespace Model {
22
26 public:
27 AWS_RECYCLEBIN_API CreateRuleRequest() = 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 "CreateRule"; }
34
35 AWS_RECYCLEBIN_API Aws::String SerializePayload() const override;
36
38
42 inline const RetentionPeriod& GetRetentionPeriod() const { return m_retentionPeriod; }
43 inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; }
44 template <typename RetentionPeriodT = RetentionPeriod>
45 void SetRetentionPeriod(RetentionPeriodT&& value) {
46 m_retentionPeriodHasBeenSet = true;
47 m_retentionPeriod = std::forward<RetentionPeriodT>(value);
48 }
49 template <typename RetentionPeriodT = RetentionPeriod>
50 CreateRuleRequest& WithRetentionPeriod(RetentionPeriodT&& value) {
51 SetRetentionPeriod(std::forward<RetentionPeriodT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetDescription() const { return m_description; }
61 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
62 template <typename DescriptionT = Aws::String>
63 void SetDescription(DescriptionT&& value) {
64 m_descriptionHasBeenSet = true;
65 m_description = std::forward<DescriptionT>(value);
66 }
67 template <typename DescriptionT = Aws::String>
68 CreateRuleRequest& WithDescription(DescriptionT&& value) {
69 SetDescription(std::forward<DescriptionT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
79 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
80 template <typename TagsT = Aws::Vector<Tag>>
81 void SetTags(TagsT&& value) {
82 m_tagsHasBeenSet = true;
83 m_tags = std::forward<TagsT>(value);
84 }
85 template <typename TagsT = Aws::Vector<Tag>>
86 CreateRuleRequest& WithTags(TagsT&& value) {
87 SetTags(std::forward<TagsT>(value));
88 return *this;
89 }
90 template <typename TagsT = Tag>
91 CreateRuleRequest& AddTags(TagsT&& value) {
92 m_tagsHasBeenSet = true;
93 m_tags.emplace_back(std::forward<TagsT>(value));
94 return *this;
95 }
97
99
106 inline ResourceType GetResourceType() const { return m_resourceType; }
107 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
108 inline void SetResourceType(ResourceType value) {
109 m_resourceTypeHasBeenSet = true;
110 m_resourceType = value;
111 }
113 SetResourceType(value);
114 return *this;
115 }
117
119
133 inline const Aws::Vector<ResourceTag>& GetResourceTags() const { return m_resourceTags; }
134 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
135 template <typename ResourceTagsT = Aws::Vector<ResourceTag>>
136 void SetResourceTags(ResourceTagsT&& value) {
137 m_resourceTagsHasBeenSet = true;
138 m_resourceTags = std::forward<ResourceTagsT>(value);
139 }
140 template <typename ResourceTagsT = Aws::Vector<ResourceTag>>
141 CreateRuleRequest& WithResourceTags(ResourceTagsT&& value) {
142 SetResourceTags(std::forward<ResourceTagsT>(value));
143 return *this;
144 }
145 template <typename ResourceTagsT = ResourceTag>
146 CreateRuleRequest& AddResourceTags(ResourceTagsT&& value) {
147 m_resourceTagsHasBeenSet = true;
148 m_resourceTags.emplace_back(std::forward<ResourceTagsT>(value));
149 return *this;
150 }
152
154
157 inline const LockConfiguration& GetLockConfiguration() const { return m_lockConfiguration; }
158 inline bool LockConfigurationHasBeenSet() const { return m_lockConfigurationHasBeenSet; }
159 template <typename LockConfigurationT = LockConfiguration>
160 void SetLockConfiguration(LockConfigurationT&& value) {
161 m_lockConfigurationHasBeenSet = true;
162 m_lockConfiguration = std::forward<LockConfigurationT>(value);
163 }
164 template <typename LockConfigurationT = LockConfiguration>
165 CreateRuleRequest& WithLockConfiguration(LockConfigurationT&& value) {
166 SetLockConfiguration(std::forward<LockConfigurationT>(value));
167 return *this;
168 }
170
172
179 inline const Aws::Vector<ResourceTag>& GetExcludeResourceTags() const { return m_excludeResourceTags; }
180 inline bool ExcludeResourceTagsHasBeenSet() const { return m_excludeResourceTagsHasBeenSet; }
181 template <typename ExcludeResourceTagsT = Aws::Vector<ResourceTag>>
182 void SetExcludeResourceTags(ExcludeResourceTagsT&& value) {
183 m_excludeResourceTagsHasBeenSet = true;
184 m_excludeResourceTags = std::forward<ExcludeResourceTagsT>(value);
185 }
186 template <typename ExcludeResourceTagsT = Aws::Vector<ResourceTag>>
187 CreateRuleRequest& WithExcludeResourceTags(ExcludeResourceTagsT&& value) {
188 SetExcludeResourceTags(std::forward<ExcludeResourceTagsT>(value));
189 return *this;
190 }
191 template <typename ExcludeResourceTagsT = ResourceTag>
192 CreateRuleRequest& AddExcludeResourceTags(ExcludeResourceTagsT&& value) {
193 m_excludeResourceTagsHasBeenSet = true;
194 m_excludeResourceTags.emplace_back(std::forward<ExcludeResourceTagsT>(value));
195 return *this;
196 }
198 private:
199 RetentionPeriod m_retentionPeriod;
200
201 Aws::String m_description;
202
203 Aws::Vector<Tag> m_tags;
204
205 ResourceType m_resourceType{ResourceType::NOT_SET};
206
207 Aws::Vector<ResourceTag> m_resourceTags;
208
209 LockConfiguration m_lockConfiguration;
210
211 Aws::Vector<ResourceTag> m_excludeResourceTags;
212 bool m_retentionPeriodHasBeenSet = false;
213 bool m_descriptionHasBeenSet = false;
214 bool m_tagsHasBeenSet = false;
215 bool m_resourceTypeHasBeenSet = false;
216 bool m_resourceTagsHasBeenSet = false;
217 bool m_lockConfigurationHasBeenSet = false;
218 bool m_excludeResourceTagsHasBeenSet = false;
219};
220
221} // namespace Model
222} // namespace RecycleBin
223} // namespace Aws
CreateRuleRequest & WithResourceTags(ResourceTagsT &&value)
CreateRuleRequest & AddResourceTags(ResourceTagsT &&value)
const Aws::String & GetDescription() const
CreateRuleRequest & AddExcludeResourceTags(ExcludeResourceTagsT &&value)
const Aws::Vector< Tag > & GetTags() const
CreateRuleRequest & WithTags(TagsT &&value)
void SetLockConfiguration(LockConfigurationT &&value)
CreateRuleRequest & WithResourceType(ResourceType value)
const Aws::Vector< ResourceTag > & GetResourceTags() const
CreateRuleRequest & WithExcludeResourceTags(ExcludeResourceTagsT &&value)
CreateRuleRequest & WithLockConfiguration(LockConfigurationT &&value)
void SetResourceTags(ResourceTagsT &&value)
void SetRetentionPeriod(RetentionPeriodT &&value)
const RetentionPeriod & GetRetentionPeriod() const
CreateRuleRequest & WithDescription(DescriptionT &&value)
AWS_RECYCLEBIN_API Aws::String SerializePayload() const override
void SetExcludeResourceTags(ExcludeResourceTagsT &&value)
CreateRuleRequest & AddTags(TagsT &&value)
CreateRuleRequest & WithRetentionPeriod(RetentionPeriodT &&value)
const Aws::Vector< ResourceTag > & GetExcludeResourceTags() const
virtual const char * GetServiceRequestName() const override
const LockConfiguration & GetLockConfiguration() const
AWS_RECYCLEBIN_API CreateRuleRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector