AWS SDK for C++

AWS SDK for C++ Version 1.11.709

Loading...
Searching...
No Matches
CreatePermissionRequest.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/ram/RAMRequest.h>
10#include <aws/ram/RAM_EXPORTS.h>
11#include <aws/ram/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace RAM {
17namespace Model {
18
22 public:
23 AWS_RAM_API CreatePermissionRequest() = 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 "CreatePermission"; }
30
31 AWS_RAM_API Aws::String SerializePayload() const override;
32
34
38 inline const Aws::String& GetName() const { return m_name; }
39 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
40 template <typename NameT = Aws::String>
41 void SetName(NameT&& value) {
42 m_nameHasBeenSet = true;
43 m_name = std::forward<NameT>(value);
44 }
45 template <typename NameT = Aws::String>
47 SetName(std::forward<NameT>(value));
48 return *this;
49 }
51
53
61 inline const Aws::String& GetResourceType() const { return m_resourceType; }
62 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
63 template <typename ResourceTypeT = Aws::String>
64 void SetResourceType(ResourceTypeT&& value) {
65 m_resourceTypeHasBeenSet = true;
66 m_resourceType = std::forward<ResourceTypeT>(value);
67 }
68 template <typename ResourceTypeT = Aws::String>
69 CreatePermissionRequest& WithResourceType(ResourceTypeT&& value) {
70 SetResourceType(std::forward<ResourceTypeT>(value));
71 return *this;
72 }
74
76
98 inline const Aws::String& GetPolicyTemplate() const { return m_policyTemplate; }
99 inline bool PolicyTemplateHasBeenSet() const { return m_policyTemplateHasBeenSet; }
100 template <typename PolicyTemplateT = Aws::String>
101 void SetPolicyTemplate(PolicyTemplateT&& value) {
102 m_policyTemplateHasBeenSet = true;
103 m_policyTemplate = std::forward<PolicyTemplateT>(value);
104 }
105 template <typename PolicyTemplateT = Aws::String>
106 CreatePermissionRequest& WithPolicyTemplate(PolicyTemplateT&& value) {
107 SetPolicyTemplate(std::forward<PolicyTemplateT>(value));
108 return *this;
109 }
111
113
125 inline const Aws::String& GetClientToken() const { return m_clientToken; }
126 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
127 template <typename ClientTokenT = Aws::String>
128 void SetClientToken(ClientTokenT&& value) {
129 m_clientTokenHasBeenSet = true;
130 m_clientToken = std::forward<ClientTokenT>(value);
131 }
132 template <typename ClientTokenT = Aws::String>
134 SetClientToken(std::forward<ClientTokenT>(value));
135 return *this;
136 }
138
140
144 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
145 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
146 template <typename TagsT = Aws::Vector<Tag>>
147 void SetTags(TagsT&& value) {
148 m_tagsHasBeenSet = true;
149 m_tags = std::forward<TagsT>(value);
150 }
151 template <typename TagsT = Aws::Vector<Tag>>
153 SetTags(std::forward<TagsT>(value));
154 return *this;
155 }
156 template <typename TagsT = Tag>
158 m_tagsHasBeenSet = true;
159 m_tags.emplace_back(std::forward<TagsT>(value));
160 return *this;
161 }
163 private:
164 Aws::String m_name;
165
166 Aws::String m_resourceType;
167
168 Aws::String m_policyTemplate;
169
170 Aws::String m_clientToken;
171
172 Aws::Vector<Tag> m_tags;
173 bool m_nameHasBeenSet = false;
174 bool m_resourceTypeHasBeenSet = false;
175 bool m_policyTemplateHasBeenSet = false;
176 bool m_clientTokenHasBeenSet = false;
177 bool m_tagsHasBeenSet = false;
178};
179
180} // namespace Model
181} // namespace RAM
182} // namespace Aws
CreatePermissionRequest & WithPolicyTemplate(PolicyTemplateT &&value)
CreatePermissionRequest & WithClientToken(ClientTokenT &&value)
CreatePermissionRequest & AddTags(TagsT &&value)
AWS_RAM_API CreatePermissionRequest()=default
CreatePermissionRequest & WithTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
CreatePermissionRequest & WithResourceType(ResourceTypeT &&value)
const Aws::Vector< Tag > & GetTags() const
CreatePermissionRequest & WithName(NameT &&value)
AWS_RAM_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector