AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/rbin/RecycleBin_EXPORTS.h>
8#include <aws/rbin/RecycleBinRequest.h>
9#include <aws/rbin/model/RetentionPeriod.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/rbin/model/ResourceType.h>
13#include <aws/rbin/model/LockConfiguration.h>
14#include <aws/rbin/model/Tag.h>
15#include <aws/rbin/model/ResourceTag.h>
16#include <utility>
17
18namespace Aws
19{
20namespace RecycleBin
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_RECYCLEBIN_API CreateRuleRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
37
38 AWS_RECYCLEBIN_API Aws::String SerializePayload() const override;
39
40
42
46 inline const RetentionPeriod& GetRetentionPeriod() const { return m_retentionPeriod; }
47 inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; }
48 template<typename RetentionPeriodT = RetentionPeriod>
49 void SetRetentionPeriod(RetentionPeriodT&& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = std::forward<RetentionPeriodT>(value); }
50 template<typename RetentionPeriodT = RetentionPeriod>
51 CreateRuleRequest& WithRetentionPeriod(RetentionPeriodT&& value) { SetRetentionPeriod(std::forward<RetentionPeriodT>(value)); return *this;}
53
55
58 inline const Aws::String& GetDescription() const { return m_description; }
59 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
60 template<typename DescriptionT = Aws::String>
61 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
62 template<typename DescriptionT = Aws::String>
63 CreateRuleRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
65
67
70 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
71 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
72 template<typename TagsT = Aws::Vector<Tag>>
73 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
74 template<typename TagsT = Aws::Vector<Tag>>
75 CreateRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
76 template<typename TagsT = Tag>
77 CreateRuleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
79
81
87 inline ResourceType GetResourceType() const { return m_resourceType; }
88 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
89 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
90 inline CreateRuleRequest& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
92
94
108 inline const Aws::Vector<ResourceTag>& GetResourceTags() const { return m_resourceTags; }
109 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
110 template<typename ResourceTagsT = Aws::Vector<ResourceTag>>
111 void SetResourceTags(ResourceTagsT&& value) { m_resourceTagsHasBeenSet = true; m_resourceTags = std::forward<ResourceTagsT>(value); }
112 template<typename ResourceTagsT = Aws::Vector<ResourceTag>>
113 CreateRuleRequest& WithResourceTags(ResourceTagsT&& value) { SetResourceTags(std::forward<ResourceTagsT>(value)); return *this;}
114 template<typename ResourceTagsT = ResourceTag>
115 CreateRuleRequest& AddResourceTags(ResourceTagsT&& value) { m_resourceTagsHasBeenSet = true; m_resourceTags.emplace_back(std::forward<ResourceTagsT>(value)); return *this; }
117
119
122 inline const LockConfiguration& GetLockConfiguration() const { return m_lockConfiguration; }
123 inline bool LockConfigurationHasBeenSet() const { return m_lockConfigurationHasBeenSet; }
124 template<typename LockConfigurationT = LockConfiguration>
125 void SetLockConfiguration(LockConfigurationT&& value) { m_lockConfigurationHasBeenSet = true; m_lockConfiguration = std::forward<LockConfigurationT>(value); }
126 template<typename LockConfigurationT = LockConfiguration>
127 CreateRuleRequest& WithLockConfiguration(LockConfigurationT&& value) { SetLockConfiguration(std::forward<LockConfigurationT>(value)); return *this;}
129
131
138 inline const Aws::Vector<ResourceTag>& GetExcludeResourceTags() const { return m_excludeResourceTags; }
139 inline bool ExcludeResourceTagsHasBeenSet() const { return m_excludeResourceTagsHasBeenSet; }
140 template<typename ExcludeResourceTagsT = Aws::Vector<ResourceTag>>
141 void SetExcludeResourceTags(ExcludeResourceTagsT&& value) { m_excludeResourceTagsHasBeenSet = true; m_excludeResourceTags = std::forward<ExcludeResourceTagsT>(value); }
142 template<typename ExcludeResourceTagsT = Aws::Vector<ResourceTag>>
143 CreateRuleRequest& WithExcludeResourceTags(ExcludeResourceTagsT&& value) { SetExcludeResourceTags(std::forward<ExcludeResourceTagsT>(value)); return *this;}
144 template<typename ExcludeResourceTagsT = ResourceTag>
145 CreateRuleRequest& AddExcludeResourceTags(ExcludeResourceTagsT&& value) { m_excludeResourceTagsHasBeenSet = true; m_excludeResourceTags.emplace_back(std::forward<ExcludeResourceTagsT>(value)); return *this; }
147 private:
148
149 RetentionPeriod m_retentionPeriod;
150 bool m_retentionPeriodHasBeenSet = false;
151
152 Aws::String m_description;
153 bool m_descriptionHasBeenSet = false;
154
155 Aws::Vector<Tag> m_tags;
156 bool m_tagsHasBeenSet = false;
157
158 ResourceType m_resourceType{ResourceType::NOT_SET};
159 bool m_resourceTypeHasBeenSet = false;
160
161 Aws::Vector<ResourceTag> m_resourceTags;
162 bool m_resourceTagsHasBeenSet = false;
163
164 LockConfiguration m_lockConfiguration;
165 bool m_lockConfigurationHasBeenSet = false;
166
167 Aws::Vector<ResourceTag> m_excludeResourceTags;
168 bool m_excludeResourceTagsHasBeenSet = false;
169 };
170
171} // namespace Model
172} // namespace RecycleBin
173} // 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