AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
CreateUserRequest.h
1
6#pragma once
7#include <aws/awstransfer/TransferRequest.h>
8#include <aws/awstransfer/Transfer_EXPORTS.h>
9#include <aws/awstransfer/model/HomeDirectoryMapEntry.h>
10#include <aws/awstransfer/model/HomeDirectoryType.h>
11#include <aws/awstransfer/model/PosixProfile.h>
12#include <aws/awstransfer/model/Tag.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Transfer {
20namespace Model {
21
25 public:
26 AWS_TRANSFER_API CreateUserRequest() = 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 "CreateUser"; }
33
34 AWS_TRANSFER_API Aws::String SerializePayload() const override;
35
37
39
46 inline const Aws::String& GetHomeDirectory() const { return m_homeDirectory; }
47 inline bool HomeDirectoryHasBeenSet() const { return m_homeDirectoryHasBeenSet; }
48 template <typename HomeDirectoryT = Aws::String>
49 void SetHomeDirectory(HomeDirectoryT&& value) {
50 m_homeDirectoryHasBeenSet = true;
51 m_homeDirectory = std::forward<HomeDirectoryT>(value);
52 }
53 template <typename HomeDirectoryT = Aws::String>
54 CreateUserRequest& WithHomeDirectory(HomeDirectoryT&& value) {
55 SetHomeDirectory(std::forward<HomeDirectoryT>(value));
56 return *this;
57 }
59
61
76 inline HomeDirectoryType GetHomeDirectoryType() const { return m_homeDirectoryType; }
77 inline bool HomeDirectoryTypeHasBeenSet() const { return m_homeDirectoryTypeHasBeenSet; }
79 m_homeDirectoryTypeHasBeenSet = true;
80 m_homeDirectoryType = value;
81 }
84 return *this;
85 }
87
89
109 inline const Aws::Vector<HomeDirectoryMapEntry>& GetHomeDirectoryMappings() const { return m_homeDirectoryMappings; }
110 inline bool HomeDirectoryMappingsHasBeenSet() const { return m_homeDirectoryMappingsHasBeenSet; }
111 template <typename HomeDirectoryMappingsT = Aws::Vector<HomeDirectoryMapEntry>>
112 void SetHomeDirectoryMappings(HomeDirectoryMappingsT&& value) {
113 m_homeDirectoryMappingsHasBeenSet = true;
114 m_homeDirectoryMappings = std::forward<HomeDirectoryMappingsT>(value);
115 }
116 template <typename HomeDirectoryMappingsT = Aws::Vector<HomeDirectoryMapEntry>>
117 CreateUserRequest& WithHomeDirectoryMappings(HomeDirectoryMappingsT&& value) {
118 SetHomeDirectoryMappings(std::forward<HomeDirectoryMappingsT>(value));
119 return *this;
120 }
121 template <typename HomeDirectoryMappingsT = HomeDirectoryMapEntry>
122 CreateUserRequest& AddHomeDirectoryMappings(HomeDirectoryMappingsT&& value) {
123 m_homeDirectoryMappingsHasBeenSet = true;
124 m_homeDirectoryMappings.emplace_back(std::forward<HomeDirectoryMappingsT>(value));
125 return *this;
126 }
128
130
148 inline const Aws::String& GetPolicy() const { return m_policy; }
149 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
150 template <typename PolicyT = Aws::String>
151 void SetPolicy(PolicyT&& value) {
152 m_policyHasBeenSet = true;
153 m_policy = std::forward<PolicyT>(value);
154 }
155 template <typename PolicyT = Aws::String>
156 CreateUserRequest& WithPolicy(PolicyT&& value) {
157 SetPolicy(std::forward<PolicyT>(value));
158 return *this;
159 }
161
163
171 inline const PosixProfile& GetPosixProfile() const { return m_posixProfile; }
172 inline bool PosixProfileHasBeenSet() const { return m_posixProfileHasBeenSet; }
173 template <typename PosixProfileT = PosixProfile>
174 void SetPosixProfile(PosixProfileT&& value) {
175 m_posixProfileHasBeenSet = true;
176 m_posixProfile = std::forward<PosixProfileT>(value);
177 }
178 template <typename PosixProfileT = PosixProfile>
179 CreateUserRequest& WithPosixProfile(PosixProfileT&& value) {
180 SetPosixProfile(std::forward<PosixProfileT>(value));
181 return *this;
182 }
184
186
195 inline const Aws::String& GetRole() const { return m_role; }
196 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
197 template <typename RoleT = Aws::String>
198 void SetRole(RoleT&& value) {
199 m_roleHasBeenSet = true;
200 m_role = std::forward<RoleT>(value);
201 }
202 template <typename RoleT = Aws::String>
203 CreateUserRequest& WithRole(RoleT&& value) {
204 SetRole(std::forward<RoleT>(value));
205 return *this;
206 }
208
210
214 inline const Aws::String& GetServerId() const { return m_serverId; }
215 inline bool ServerIdHasBeenSet() const { return m_serverIdHasBeenSet; }
216 template <typename ServerIdT = Aws::String>
217 void SetServerId(ServerIdT&& value) {
218 m_serverIdHasBeenSet = true;
219 m_serverId = std::forward<ServerIdT>(value);
220 }
221 template <typename ServerIdT = Aws::String>
222 CreateUserRequest& WithServerId(ServerIdT&& value) {
223 SetServerId(std::forward<ServerIdT>(value));
224 return *this;
225 }
227
229
241 inline const Aws::String& GetSshPublicKeyBody() const { return m_sshPublicKeyBody; }
242 inline bool SshPublicKeyBodyHasBeenSet() const { return m_sshPublicKeyBodyHasBeenSet; }
243 template <typename SshPublicKeyBodyT = Aws::String>
244 void SetSshPublicKeyBody(SshPublicKeyBodyT&& value) {
245 m_sshPublicKeyBodyHasBeenSet = true;
246 m_sshPublicKeyBody = std::forward<SshPublicKeyBodyT>(value);
247 }
248 template <typename SshPublicKeyBodyT = Aws::String>
249 CreateUserRequest& WithSshPublicKeyBody(SshPublicKeyBodyT&& value) {
250 SetSshPublicKeyBody(std::forward<SshPublicKeyBodyT>(value));
251 return *this;
252 }
254
256
260 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
261 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
262 template <typename TagsT = Aws::Vector<Tag>>
263 void SetTags(TagsT&& value) {
264 m_tagsHasBeenSet = true;
265 m_tags = std::forward<TagsT>(value);
266 }
267 template <typename TagsT = Aws::Vector<Tag>>
268 CreateUserRequest& WithTags(TagsT&& value) {
269 SetTags(std::forward<TagsT>(value));
270 return *this;
271 }
272 template <typename TagsT = Tag>
273 CreateUserRequest& AddTags(TagsT&& value) {
274 m_tagsHasBeenSet = true;
275 m_tags.emplace_back(std::forward<TagsT>(value));
276 return *this;
277 }
279
281
288 inline const Aws::String& GetUserName() const { return m_userName; }
289 inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; }
290 template <typename UserNameT = Aws::String>
291 void SetUserName(UserNameT&& value) {
292 m_userNameHasBeenSet = true;
293 m_userName = std::forward<UserNameT>(value);
294 }
295 template <typename UserNameT = Aws::String>
296 CreateUserRequest& WithUserName(UserNameT&& value) {
297 SetUserName(std::forward<UserNameT>(value));
298 return *this;
299 }
301 private:
302 Aws::String m_homeDirectory;
303
305
306 Aws::Vector<HomeDirectoryMapEntry> m_homeDirectoryMappings;
307
308 Aws::String m_policy;
309
310 PosixProfile m_posixProfile;
311
312 Aws::String m_role;
313
314 Aws::String m_serverId;
315
316 Aws::String m_sshPublicKeyBody;
317
318 Aws::Vector<Tag> m_tags;
319
320 Aws::String m_userName;
321 bool m_homeDirectoryHasBeenSet = false;
322 bool m_homeDirectoryTypeHasBeenSet = false;
323 bool m_homeDirectoryMappingsHasBeenSet = false;
324 bool m_policyHasBeenSet = false;
325 bool m_posixProfileHasBeenSet = false;
326 bool m_roleHasBeenSet = false;
327 bool m_serverIdHasBeenSet = false;
328 bool m_sshPublicKeyBodyHasBeenSet = false;
329 bool m_tagsHasBeenSet = false;
330 bool m_userNameHasBeenSet = false;
331};
332
333} // namespace Model
334} // namespace Transfer
335} // namespace Aws
void SetHomeDirectoryType(HomeDirectoryType value)
const PosixProfile & GetPosixProfile() const
const Aws::String & GetServerId() const
CreateUserRequest & WithTags(TagsT &&value)
CreateUserRequest & WithRole(RoleT &&value)
void SetHomeDirectoryMappings(HomeDirectoryMappingsT &&value)
const Aws::Vector< HomeDirectoryMapEntry > & GetHomeDirectoryMappings() const
const Aws::String & GetSshPublicKeyBody() const
CreateUserRequest & AddTags(TagsT &&value)
AWS_TRANSFER_API Aws::String SerializePayload() const override
CreateUserRequest & WithPolicy(PolicyT &&value)
HomeDirectoryType GetHomeDirectoryType() const
void SetHomeDirectory(HomeDirectoryT &&value)
CreateUserRequest & WithHomeDirectory(HomeDirectoryT &&value)
void SetPosixProfile(PosixProfileT &&value)
CreateUserRequest & WithSshPublicKeyBody(SshPublicKeyBodyT &&value)
CreateUserRequest & WithPosixProfile(PosixProfileT &&value)
const Aws::Vector< Tag > & GetTags() const
CreateUserRequest & WithUserName(UserNameT &&value)
CreateUserRequest & AddHomeDirectoryMappings(HomeDirectoryMappingsT &&value)
virtual const char * GetServiceRequestName() const override
CreateUserRequest & WithHomeDirectoryMappings(HomeDirectoryMappingsT &&value)
void SetSshPublicKeyBody(SshPublicKeyBodyT &&value)
const Aws::String & GetUserName() const
CreateUserRequest & WithServerId(ServerIdT &&value)
CreateUserRequest & WithHomeDirectoryType(HomeDirectoryType value)
AWS_TRANSFER_API CreateUserRequest()=default
AWS_TRANSFER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetHomeDirectory() const
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