AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateAppRequest.h
1
6#pragma once
7#include <aws/amplify/AmplifyRequest.h>
8#include <aws/amplify/Amplify_EXPORTS.h>
9#include <aws/amplify/model/AutoBranchCreationConfig.h>
10#include <aws/amplify/model/CacheConfig.h>
11#include <aws/amplify/model/CustomRule.h>
12#include <aws/amplify/model/JobConfig.h>
13#include <aws/amplify/model/Platform.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Amplify {
22namespace Model {
23
31 public:
32 AWS_AMPLIFY_API CreateAppRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateApp"; }
39
40 AWS_AMPLIFY_API Aws::String SerializePayload() const override;
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
54 CreateAppRequest& WithName(NameT&& value) {
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetDescription() const { return m_description; }
65 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
66 template <typename DescriptionT = Aws::String>
67 void SetDescription(DescriptionT&& value) {
68 m_descriptionHasBeenSet = true;
69 m_description = std::forward<DescriptionT>(value);
70 }
71 template <typename DescriptionT = Aws::String>
72 CreateAppRequest& WithDescription(DescriptionT&& value) {
73 SetDescription(std::forward<DescriptionT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetRepository() const { return m_repository; }
83 inline bool RepositoryHasBeenSet() const { return m_repositoryHasBeenSet; }
84 template <typename RepositoryT = Aws::String>
85 void SetRepository(RepositoryT&& value) {
86 m_repositoryHasBeenSet = true;
87 m_repository = std::forward<RepositoryT>(value);
88 }
89 template <typename RepositoryT = Aws::String>
90 CreateAppRequest& WithRepository(RepositoryT&& value) {
91 SetRepository(std::forward<RepositoryT>(value));
92 return *this;
93 }
95
97
111 inline Platform GetPlatform() const { return m_platform; }
112 inline bool PlatformHasBeenSet() const { return m_platformHasBeenSet; }
113 inline void SetPlatform(Platform value) {
114 m_platformHasBeenSet = true;
115 m_platform = value;
116 }
118 SetPlatform(value);
119 return *this;
120 }
122
124
132 inline const Aws::String& GetComputeRoleArn() const { return m_computeRoleArn; }
133 inline bool ComputeRoleArnHasBeenSet() const { return m_computeRoleArnHasBeenSet; }
134 template <typename ComputeRoleArnT = Aws::String>
135 void SetComputeRoleArn(ComputeRoleArnT&& value) {
136 m_computeRoleArnHasBeenSet = true;
137 m_computeRoleArn = std::forward<ComputeRoleArnT>(value);
138 }
139 template <typename ComputeRoleArnT = Aws::String>
140 CreateAppRequest& WithComputeRoleArn(ComputeRoleArnT&& value) {
141 SetComputeRoleArn(std::forward<ComputeRoleArnT>(value));
142 return *this;
143 }
145
147
151 inline const Aws::String& GetIamServiceRoleArn() const { return m_iamServiceRoleArn; }
152 inline bool IamServiceRoleArnHasBeenSet() const { return m_iamServiceRoleArnHasBeenSet; }
153 template <typename IamServiceRoleArnT = Aws::String>
154 void SetIamServiceRoleArn(IamServiceRoleArnT&& value) {
155 m_iamServiceRoleArnHasBeenSet = true;
156 m_iamServiceRoleArn = std::forward<IamServiceRoleArnT>(value);
157 }
158 template <typename IamServiceRoleArnT = Aws::String>
159 CreateAppRequest& WithIamServiceRoleArn(IamServiceRoleArnT&& value) {
160 SetIamServiceRoleArn(std::forward<IamServiceRoleArnT>(value));
161 return *this;
162 }
164
166
181 inline const Aws::String& GetOauthToken() const { return m_oauthToken; }
182 inline bool OauthTokenHasBeenSet() const { return m_oauthTokenHasBeenSet; }
183 template <typename OauthTokenT = Aws::String>
184 void SetOauthToken(OauthTokenT&& value) {
185 m_oauthTokenHasBeenSet = true;
186 m_oauthToken = std::forward<OauthTokenT>(value);
187 }
188 template <typename OauthTokenT = Aws::String>
189 CreateAppRequest& WithOauthToken(OauthTokenT&& value) {
190 SetOauthToken(std::forward<OauthTokenT>(value));
191 return *this;
192 }
194
196
211 inline const Aws::String& GetAccessToken() const { return m_accessToken; }
212 inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
213 template <typename AccessTokenT = Aws::String>
214 void SetAccessToken(AccessTokenT&& value) {
215 m_accessTokenHasBeenSet = true;
216 m_accessToken = std::forward<AccessTokenT>(value);
217 }
218 template <typename AccessTokenT = Aws::String>
219 CreateAppRequest& WithAccessToken(AccessTokenT&& value) {
220 SetAccessToken(std::forward<AccessTokenT>(value));
221 return *this;
222 }
224
226
232 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironmentVariables() const { return m_environmentVariables; }
233 inline bool EnvironmentVariablesHasBeenSet() const { return m_environmentVariablesHasBeenSet; }
234 template <typename EnvironmentVariablesT = Aws::Map<Aws::String, Aws::String>>
235 void SetEnvironmentVariables(EnvironmentVariablesT&& value) {
236 m_environmentVariablesHasBeenSet = true;
237 m_environmentVariables = std::forward<EnvironmentVariablesT>(value);
238 }
239 template <typename EnvironmentVariablesT = Aws::Map<Aws::String, Aws::String>>
240 CreateAppRequest& WithEnvironmentVariables(EnvironmentVariablesT&& value) {
241 SetEnvironmentVariables(std::forward<EnvironmentVariablesT>(value));
242 return *this;
243 }
244 template <typename EnvironmentVariablesKeyT = Aws::String, typename EnvironmentVariablesValueT = Aws::String>
245 CreateAppRequest& AddEnvironmentVariables(EnvironmentVariablesKeyT&& key, EnvironmentVariablesValueT&& value) {
246 m_environmentVariablesHasBeenSet = true;
247 m_environmentVariables.emplace(std::forward<EnvironmentVariablesKeyT>(key), std::forward<EnvironmentVariablesValueT>(value));
248 return *this;
249 }
251
253
256 inline bool GetEnableBranchAutoBuild() const { return m_enableBranchAutoBuild; }
257 inline bool EnableBranchAutoBuildHasBeenSet() const { return m_enableBranchAutoBuildHasBeenSet; }
258 inline void SetEnableBranchAutoBuild(bool value) {
259 m_enableBranchAutoBuildHasBeenSet = true;
260 m_enableBranchAutoBuild = value;
261 }
264 return *this;
265 }
267
269
273 inline bool GetEnableBranchAutoDeletion() const { return m_enableBranchAutoDeletion; }
274 inline bool EnableBranchAutoDeletionHasBeenSet() const { return m_enableBranchAutoDeletionHasBeenSet; }
275 inline void SetEnableBranchAutoDeletion(bool value) {
276 m_enableBranchAutoDeletionHasBeenSet = true;
277 m_enableBranchAutoDeletion = value;
278 }
281 return *this;
282 }
284
286
290 inline bool GetEnableBasicAuth() const { return m_enableBasicAuth; }
291 inline bool EnableBasicAuthHasBeenSet() const { return m_enableBasicAuthHasBeenSet; }
292 inline void SetEnableBasicAuth(bool value) {
293 m_enableBasicAuthHasBeenSet = true;
294 m_enableBasicAuth = value;
295 }
297 SetEnableBasicAuth(value);
298 return *this;
299 }
301
303
308 inline const Aws::String& GetBasicAuthCredentials() const { return m_basicAuthCredentials; }
309 inline bool BasicAuthCredentialsHasBeenSet() const { return m_basicAuthCredentialsHasBeenSet; }
310 template <typename BasicAuthCredentialsT = Aws::String>
311 void SetBasicAuthCredentials(BasicAuthCredentialsT&& value) {
312 m_basicAuthCredentialsHasBeenSet = true;
313 m_basicAuthCredentials = std::forward<BasicAuthCredentialsT>(value);
314 }
315 template <typename BasicAuthCredentialsT = Aws::String>
316 CreateAppRequest& WithBasicAuthCredentials(BasicAuthCredentialsT&& value) {
317 SetBasicAuthCredentials(std::forward<BasicAuthCredentialsT>(value));
318 return *this;
319 }
321
323
326 inline const Aws::Vector<CustomRule>& GetCustomRules() const { return m_customRules; }
327 inline bool CustomRulesHasBeenSet() const { return m_customRulesHasBeenSet; }
328 template <typename CustomRulesT = Aws::Vector<CustomRule>>
329 void SetCustomRules(CustomRulesT&& value) {
330 m_customRulesHasBeenSet = true;
331 m_customRules = std::forward<CustomRulesT>(value);
332 }
333 template <typename CustomRulesT = Aws::Vector<CustomRule>>
334 CreateAppRequest& WithCustomRules(CustomRulesT&& value) {
335 SetCustomRules(std::forward<CustomRulesT>(value));
336 return *this;
337 }
338 template <typename CustomRulesT = CustomRule>
339 CreateAppRequest& AddCustomRules(CustomRulesT&& value) {
340 m_customRulesHasBeenSet = true;
341 m_customRules.emplace_back(std::forward<CustomRulesT>(value));
342 return *this;
343 }
345
347
350 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
351 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
352 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
353 void SetTags(TagsT&& value) {
354 m_tagsHasBeenSet = true;
355 m_tags = std::forward<TagsT>(value);
356 }
357 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
358 CreateAppRequest& WithTags(TagsT&& value) {
359 SetTags(std::forward<TagsT>(value));
360 return *this;
361 }
362 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
363 CreateAppRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
364 m_tagsHasBeenSet = true;
365 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
366 return *this;
367 }
369
371
374 inline const Aws::String& GetBuildSpec() const { return m_buildSpec; }
375 inline bool BuildSpecHasBeenSet() const { return m_buildSpecHasBeenSet; }
376 template <typename BuildSpecT = Aws::String>
377 void SetBuildSpec(BuildSpecT&& value) {
378 m_buildSpecHasBeenSet = true;
379 m_buildSpec = std::forward<BuildSpecT>(value);
380 }
381 template <typename BuildSpecT = Aws::String>
382 CreateAppRequest& WithBuildSpec(BuildSpecT&& value) {
383 SetBuildSpec(std::forward<BuildSpecT>(value));
384 return *this;
385 }
387
389
392 inline const Aws::String& GetCustomHeaders() const { return m_customHeaders; }
393 inline bool CustomHeadersHasBeenSet() const { return m_customHeadersHasBeenSet; }
394 template <typename CustomHeadersT = Aws::String>
395 void SetCustomHeaders(CustomHeadersT&& value) {
396 m_customHeadersHasBeenSet = true;
397 m_customHeaders = std::forward<CustomHeadersT>(value);
398 }
399 template <typename CustomHeadersT = Aws::String>
400 CreateAppRequest& WithCustomHeaders(CustomHeadersT&& value) {
401 SetCustomHeaders(std::forward<CustomHeadersT>(value));
402 return *this;
403 }
405
407
410 inline bool GetEnableAutoBranchCreation() const { return m_enableAutoBranchCreation; }
411 inline bool EnableAutoBranchCreationHasBeenSet() const { return m_enableAutoBranchCreationHasBeenSet; }
412 inline void SetEnableAutoBranchCreation(bool value) {
413 m_enableAutoBranchCreationHasBeenSet = true;
414 m_enableAutoBranchCreation = value;
415 }
418 return *this;
419 }
421
423
426 inline const Aws::Vector<Aws::String>& GetAutoBranchCreationPatterns() const { return m_autoBranchCreationPatterns; }
427 inline bool AutoBranchCreationPatternsHasBeenSet() const { return m_autoBranchCreationPatternsHasBeenSet; }
428 template <typename AutoBranchCreationPatternsT = Aws::Vector<Aws::String>>
429 void SetAutoBranchCreationPatterns(AutoBranchCreationPatternsT&& value) {
430 m_autoBranchCreationPatternsHasBeenSet = true;
431 m_autoBranchCreationPatterns = std::forward<AutoBranchCreationPatternsT>(value);
432 }
433 template <typename AutoBranchCreationPatternsT = Aws::Vector<Aws::String>>
434 CreateAppRequest& WithAutoBranchCreationPatterns(AutoBranchCreationPatternsT&& value) {
435 SetAutoBranchCreationPatterns(std::forward<AutoBranchCreationPatternsT>(value));
436 return *this;
437 }
438 template <typename AutoBranchCreationPatternsT = Aws::String>
439 CreateAppRequest& AddAutoBranchCreationPatterns(AutoBranchCreationPatternsT&& value) {
440 m_autoBranchCreationPatternsHasBeenSet = true;
441 m_autoBranchCreationPatterns.emplace_back(std::forward<AutoBranchCreationPatternsT>(value));
442 return *this;
443 }
445
447
450 inline const AutoBranchCreationConfig& GetAutoBranchCreationConfig() const { return m_autoBranchCreationConfig; }
451 inline bool AutoBranchCreationConfigHasBeenSet() const { return m_autoBranchCreationConfigHasBeenSet; }
452 template <typename AutoBranchCreationConfigT = AutoBranchCreationConfig>
453 void SetAutoBranchCreationConfig(AutoBranchCreationConfigT&& value) {
454 m_autoBranchCreationConfigHasBeenSet = true;
455 m_autoBranchCreationConfig = std::forward<AutoBranchCreationConfigT>(value);
456 }
457 template <typename AutoBranchCreationConfigT = AutoBranchCreationConfig>
458 CreateAppRequest& WithAutoBranchCreationConfig(AutoBranchCreationConfigT&& value) {
459 SetAutoBranchCreationConfig(std::forward<AutoBranchCreationConfigT>(value));
460 return *this;
461 }
463
465
469 inline const JobConfig& GetJobConfig() const { return m_jobConfig; }
470 inline bool JobConfigHasBeenSet() const { return m_jobConfigHasBeenSet; }
471 template <typename JobConfigT = JobConfig>
472 void SetJobConfig(JobConfigT&& value) {
473 m_jobConfigHasBeenSet = true;
474 m_jobConfig = std::forward<JobConfigT>(value);
475 }
476 template <typename JobConfigT = JobConfig>
477 CreateAppRequest& WithJobConfig(JobConfigT&& value) {
478 SetJobConfig(std::forward<JobConfigT>(value));
479 return *this;
480 }
482
484
487 inline const CacheConfig& GetCacheConfig() const { return m_cacheConfig; }
488 inline bool CacheConfigHasBeenSet() const { return m_cacheConfigHasBeenSet; }
489 template <typename CacheConfigT = CacheConfig>
490 void SetCacheConfig(CacheConfigT&& value) {
491 m_cacheConfigHasBeenSet = true;
492 m_cacheConfig = std::forward<CacheConfigT>(value);
493 }
494 template <typename CacheConfigT = CacheConfig>
495 CreateAppRequest& WithCacheConfig(CacheConfigT&& value) {
496 SetCacheConfig(std::forward<CacheConfigT>(value));
497 return *this;
498 }
500 private:
501 Aws::String m_name;
502
503 Aws::String m_description;
504
505 Aws::String m_repository;
506
507 Platform m_platform{Platform::NOT_SET};
508
509 Aws::String m_computeRoleArn;
510
511 Aws::String m_iamServiceRoleArn;
512
513 Aws::String m_oauthToken;
514
515 Aws::String m_accessToken;
516
517 Aws::Map<Aws::String, Aws::String> m_environmentVariables;
518
519 bool m_enableBranchAutoBuild{false};
520
521 bool m_enableBranchAutoDeletion{false};
522
523 bool m_enableBasicAuth{false};
524
525 Aws::String m_basicAuthCredentials;
526
527 Aws::Vector<CustomRule> m_customRules;
528
530
531 Aws::String m_buildSpec;
532
533 Aws::String m_customHeaders;
534
535 bool m_enableAutoBranchCreation{false};
536
537 Aws::Vector<Aws::String> m_autoBranchCreationPatterns;
538
539 AutoBranchCreationConfig m_autoBranchCreationConfig;
540
541 JobConfig m_jobConfig;
542
543 CacheConfig m_cacheConfig;
544 bool m_nameHasBeenSet = false;
545 bool m_descriptionHasBeenSet = false;
546 bool m_repositoryHasBeenSet = false;
547 bool m_platformHasBeenSet = false;
548 bool m_computeRoleArnHasBeenSet = false;
549 bool m_iamServiceRoleArnHasBeenSet = false;
550 bool m_oauthTokenHasBeenSet = false;
551 bool m_accessTokenHasBeenSet = false;
552 bool m_environmentVariablesHasBeenSet = false;
553 bool m_enableBranchAutoBuildHasBeenSet = false;
554 bool m_enableBranchAutoDeletionHasBeenSet = false;
555 bool m_enableBasicAuthHasBeenSet = false;
556 bool m_basicAuthCredentialsHasBeenSet = false;
557 bool m_customRulesHasBeenSet = false;
558 bool m_tagsHasBeenSet = false;
559 bool m_buildSpecHasBeenSet = false;
560 bool m_customHeadersHasBeenSet = false;
561 bool m_enableAutoBranchCreationHasBeenSet = false;
562 bool m_autoBranchCreationPatternsHasBeenSet = false;
563 bool m_autoBranchCreationConfigHasBeenSet = false;
564 bool m_jobConfigHasBeenSet = false;
565 bool m_cacheConfigHasBeenSet = false;
566};
567
568} // namespace Model
569} // namespace Amplify
570} // namespace Aws
void SetIamServiceRoleArn(IamServiceRoleArnT &&value)
CreateAppRequest & WithBuildSpec(BuildSpecT &&value)
CreateAppRequest & WithCustomRules(CustomRulesT &&value)
const Aws::String & GetCustomHeaders() const
CreateAppRequest & AddAutoBranchCreationPatterns(AutoBranchCreationPatternsT &&value)
const Aws::String & GetComputeRoleArn() const
const AutoBranchCreationConfig & GetAutoBranchCreationConfig() const
CreateAppRequest & AddEnvironmentVariables(EnvironmentVariablesKeyT &&key, EnvironmentVariablesValueT &&value)
CreateAppRequest & WithTags(TagsT &&value)
void SetEnvironmentVariables(EnvironmentVariablesT &&value)
virtual const char * GetServiceRequestName() const override
CreateAppRequest & WithJobConfig(JobConfigT &&value)
const CacheConfig & GetCacheConfig() const
CreateAppRequest & WithAutoBranchCreationConfig(AutoBranchCreationConfigT &&value)
void SetCacheConfig(CacheConfigT &&value)
const Aws::Map< Aws::String, Aws::String > & GetEnvironmentVariables() const
CreateAppRequest & WithEnableAutoBranchCreation(bool value)
const Aws::String & GetBuildSpec() const
void SetAccessToken(AccessTokenT &&value)
CreateAppRequest & WithEnableBranchAutoBuild(bool value)
CreateAppRequest & WithDescription(DescriptionT &&value)
AWS_AMPLIFY_API CreateAppRequest()=default
CreateAppRequest & WithComputeRoleArn(ComputeRoleArnT &&value)
void SetCustomHeaders(CustomHeadersT &&value)
const Aws::String & GetRepository() const
const Aws::Vector< CustomRule > & GetCustomRules() const
const Aws::String & GetDescription() const
void SetAutoBranchCreationPatterns(AutoBranchCreationPatternsT &&value)
void SetRepository(RepositoryT &&value)
void SetBasicAuthCredentials(BasicAuthCredentialsT &&value)
void SetDescription(DescriptionT &&value)
const Aws::String & GetOauthToken() const
CreateAppRequest & WithBasicAuthCredentials(BasicAuthCredentialsT &&value)
CreateAppRequest & WithIamServiceRoleArn(IamServiceRoleArnT &&value)
void SetComputeRoleArn(ComputeRoleArnT &&value)
void SetOauthToken(OauthTokenT &&value)
CreateAppRequest & WithPlatform(Platform value)
const Aws::String & GetIamServiceRoleArn() const
AWS_AMPLIFY_API Aws::String SerializePayload() const override
void SetAutoBranchCreationConfig(AutoBranchCreationConfigT &&value)
const Aws::String & GetAccessToken() const
void SetCustomRules(CustomRulesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateAppRequest & WithOauthToken(OauthTokenT &&value)
CreateAppRequest & WithCacheConfig(CacheConfigT &&value)
const Aws::String & GetBasicAuthCredentials() const
CreateAppRequest & WithEnableBranchAutoDeletion(bool value)
CreateAppRequest & WithEnableBasicAuth(bool value)
CreateAppRequest & WithAccessToken(AccessTokenT &&value)
CreateAppRequest & WithCustomHeaders(CustomHeadersT &&value)
CreateAppRequest & WithRepository(RepositoryT &&value)
CreateAppRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateAppRequest & WithName(NameT &&value)
CreateAppRequest & WithEnvironmentVariables(EnvironmentVariablesT &&value)
CreateAppRequest & AddCustomRules(CustomRulesT &&value)
const JobConfig & GetJobConfig() const
CreateAppRequest & WithAutoBranchCreationPatterns(AutoBranchCreationPatternsT &&value)
const Aws::Vector< Aws::String > & GetAutoBranchCreationPatterns() const
const Aws::String & GetName() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector