1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/amplify/Amplify_EXPORTS.h>
8 #include <aws/amplify/model/Stage.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Amplify
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p> Describes the automated branch creation configuration. </p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/AutoBranchCreationConfig">AWS
32    * API Reference</a></p>
33    */
34   class AWS_AMPLIFY_API AutoBranchCreationConfig
35   {
36   public:
37     AutoBranchCreationConfig();
38     AutoBranchCreationConfig(Aws::Utils::Json::JsonView jsonValue);
39     AutoBranchCreationConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p> Describes the current stage for the autocreated branch. </p>
45      */
GetStage()46     inline const Stage& GetStage() const{ return m_stage; }
47 
48     /**
49      * <p> Describes the current stage for the autocreated branch. </p>
50      */
StageHasBeenSet()51     inline bool StageHasBeenSet() const { return m_stageHasBeenSet; }
52 
53     /**
54      * <p> Describes the current stage for the autocreated branch. </p>
55      */
SetStage(const Stage & value)56     inline void SetStage(const Stage& value) { m_stageHasBeenSet = true; m_stage = value; }
57 
58     /**
59      * <p> Describes the current stage for the autocreated branch. </p>
60      */
SetStage(Stage && value)61     inline void SetStage(Stage&& value) { m_stageHasBeenSet = true; m_stage = std::move(value); }
62 
63     /**
64      * <p> Describes the current stage for the autocreated branch. </p>
65      */
WithStage(const Stage & value)66     inline AutoBranchCreationConfig& WithStage(const Stage& value) { SetStage(value); return *this;}
67 
68     /**
69      * <p> Describes the current stage for the autocreated branch. </p>
70      */
WithStage(Stage && value)71     inline AutoBranchCreationConfig& WithStage(Stage&& value) { SetStage(std::move(value)); return *this;}
72 
73 
74     /**
75      * <p> The framework for the autocreated branch. </p>
76      */
GetFramework()77     inline const Aws::String& GetFramework() const{ return m_framework; }
78 
79     /**
80      * <p> The framework for the autocreated branch. </p>
81      */
FrameworkHasBeenSet()82     inline bool FrameworkHasBeenSet() const { return m_frameworkHasBeenSet; }
83 
84     /**
85      * <p> The framework for the autocreated branch. </p>
86      */
SetFramework(const Aws::String & value)87     inline void SetFramework(const Aws::String& value) { m_frameworkHasBeenSet = true; m_framework = value; }
88 
89     /**
90      * <p> The framework for the autocreated branch. </p>
91      */
SetFramework(Aws::String && value)92     inline void SetFramework(Aws::String&& value) { m_frameworkHasBeenSet = true; m_framework = std::move(value); }
93 
94     /**
95      * <p> The framework for the autocreated branch. </p>
96      */
SetFramework(const char * value)97     inline void SetFramework(const char* value) { m_frameworkHasBeenSet = true; m_framework.assign(value); }
98 
99     /**
100      * <p> The framework for the autocreated branch. </p>
101      */
WithFramework(const Aws::String & value)102     inline AutoBranchCreationConfig& WithFramework(const Aws::String& value) { SetFramework(value); return *this;}
103 
104     /**
105      * <p> The framework for the autocreated branch. </p>
106      */
WithFramework(Aws::String && value)107     inline AutoBranchCreationConfig& WithFramework(Aws::String&& value) { SetFramework(std::move(value)); return *this;}
108 
109     /**
110      * <p> The framework for the autocreated branch. </p>
111      */
WithFramework(const char * value)112     inline AutoBranchCreationConfig& WithFramework(const char* value) { SetFramework(value); return *this;}
113 
114 
115     /**
116      * <p> Enables auto building for the autocreated branch. </p>
117      */
GetEnableAutoBuild()118     inline bool GetEnableAutoBuild() const{ return m_enableAutoBuild; }
119 
120     /**
121      * <p> Enables auto building for the autocreated branch. </p>
122      */
EnableAutoBuildHasBeenSet()123     inline bool EnableAutoBuildHasBeenSet() const { return m_enableAutoBuildHasBeenSet; }
124 
125     /**
126      * <p> Enables auto building for the autocreated branch. </p>
127      */
SetEnableAutoBuild(bool value)128     inline void SetEnableAutoBuild(bool value) { m_enableAutoBuildHasBeenSet = true; m_enableAutoBuild = value; }
129 
130     /**
131      * <p> Enables auto building for the autocreated branch. </p>
132      */
WithEnableAutoBuild(bool value)133     inline AutoBranchCreationConfig& WithEnableAutoBuild(bool value) { SetEnableAutoBuild(value); return *this;}
134 
135 
136     /**
137      * <p> The environment variables for the autocreated branch. </p>
138      */
GetEnvironmentVariables()139     inline const Aws::Map<Aws::String, Aws::String>& GetEnvironmentVariables() const{ return m_environmentVariables; }
140 
141     /**
142      * <p> The environment variables for the autocreated branch. </p>
143      */
EnvironmentVariablesHasBeenSet()144     inline bool EnvironmentVariablesHasBeenSet() const { return m_environmentVariablesHasBeenSet; }
145 
146     /**
147      * <p> The environment variables for the autocreated branch. </p>
148      */
SetEnvironmentVariables(const Aws::Map<Aws::String,Aws::String> & value)149     inline void SetEnvironmentVariables(const Aws::Map<Aws::String, Aws::String>& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables = value; }
150 
151     /**
152      * <p> The environment variables for the autocreated branch. </p>
153      */
SetEnvironmentVariables(Aws::Map<Aws::String,Aws::String> && value)154     inline void SetEnvironmentVariables(Aws::Map<Aws::String, Aws::String>&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables = std::move(value); }
155 
156     /**
157      * <p> The environment variables for the autocreated branch. </p>
158      */
WithEnvironmentVariables(const Aws::Map<Aws::String,Aws::String> & value)159     inline AutoBranchCreationConfig& WithEnvironmentVariables(const Aws::Map<Aws::String, Aws::String>& value) { SetEnvironmentVariables(value); return *this;}
160 
161     /**
162      * <p> The environment variables for the autocreated branch. </p>
163      */
WithEnvironmentVariables(Aws::Map<Aws::String,Aws::String> && value)164     inline AutoBranchCreationConfig& WithEnvironmentVariables(Aws::Map<Aws::String, Aws::String>&& value) { SetEnvironmentVariables(std::move(value)); return *this;}
165 
166     /**
167      * <p> The environment variables for the autocreated branch. </p>
168      */
AddEnvironmentVariables(const Aws::String & key,const Aws::String & value)169     inline AutoBranchCreationConfig& AddEnvironmentVariables(const Aws::String& key, const Aws::String& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, value); return *this; }
170 
171     /**
172      * <p> The environment variables for the autocreated branch. </p>
173      */
AddEnvironmentVariables(Aws::String && key,const Aws::String & value)174     inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, const Aws::String& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), value); return *this; }
175 
176     /**
177      * <p> The environment variables for the autocreated branch. </p>
178      */
AddEnvironmentVariables(const Aws::String & key,Aws::String && value)179     inline AutoBranchCreationConfig& AddEnvironmentVariables(const Aws::String& key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, std::move(value)); return *this; }
180 
181     /**
182      * <p> The environment variables for the autocreated branch. </p>
183      */
AddEnvironmentVariables(Aws::String && key,Aws::String && value)184     inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), std::move(value)); return *this; }
185 
186     /**
187      * <p> The environment variables for the autocreated branch. </p>
188      */
AddEnvironmentVariables(const char * key,Aws::String && value)189     inline AutoBranchCreationConfig& AddEnvironmentVariables(const char* key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, std::move(value)); return *this; }
190 
191     /**
192      * <p> The environment variables for the autocreated branch. </p>
193      */
AddEnvironmentVariables(Aws::String && key,const char * value)194     inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, const char* value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), value); return *this; }
195 
196     /**
197      * <p> The environment variables for the autocreated branch. </p>
198      */
AddEnvironmentVariables(const char * key,const char * value)199     inline AutoBranchCreationConfig& AddEnvironmentVariables(const char* key, const char* value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, value); return *this; }
200 
201 
202     /**
203      * <p> The basic authorization credentials for the autocreated branch. </p>
204      */
GetBasicAuthCredentials()205     inline const Aws::String& GetBasicAuthCredentials() const{ return m_basicAuthCredentials; }
206 
207     /**
208      * <p> The basic authorization credentials for the autocreated branch. </p>
209      */
BasicAuthCredentialsHasBeenSet()210     inline bool BasicAuthCredentialsHasBeenSet() const { return m_basicAuthCredentialsHasBeenSet; }
211 
212     /**
213      * <p> The basic authorization credentials for the autocreated branch. </p>
214      */
SetBasicAuthCredentials(const Aws::String & value)215     inline void SetBasicAuthCredentials(const Aws::String& value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials = value; }
216 
217     /**
218      * <p> The basic authorization credentials for the autocreated branch. </p>
219      */
SetBasicAuthCredentials(Aws::String && value)220     inline void SetBasicAuthCredentials(Aws::String&& value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials = std::move(value); }
221 
222     /**
223      * <p> The basic authorization credentials for the autocreated branch. </p>
224      */
SetBasicAuthCredentials(const char * value)225     inline void SetBasicAuthCredentials(const char* value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials.assign(value); }
226 
227     /**
228      * <p> The basic authorization credentials for the autocreated branch. </p>
229      */
WithBasicAuthCredentials(const Aws::String & value)230     inline AutoBranchCreationConfig& WithBasicAuthCredentials(const Aws::String& value) { SetBasicAuthCredentials(value); return *this;}
231 
232     /**
233      * <p> The basic authorization credentials for the autocreated branch. </p>
234      */
WithBasicAuthCredentials(Aws::String && value)235     inline AutoBranchCreationConfig& WithBasicAuthCredentials(Aws::String&& value) { SetBasicAuthCredentials(std::move(value)); return *this;}
236 
237     /**
238      * <p> The basic authorization credentials for the autocreated branch. </p>
239      */
WithBasicAuthCredentials(const char * value)240     inline AutoBranchCreationConfig& WithBasicAuthCredentials(const char* value) { SetBasicAuthCredentials(value); return *this;}
241 
242 
243     /**
244      * <p> Enables basic authorization for the autocreated branch. </p>
245      */
GetEnableBasicAuth()246     inline bool GetEnableBasicAuth() const{ return m_enableBasicAuth; }
247 
248     /**
249      * <p> Enables basic authorization for the autocreated branch. </p>
250      */
EnableBasicAuthHasBeenSet()251     inline bool EnableBasicAuthHasBeenSet() const { return m_enableBasicAuthHasBeenSet; }
252 
253     /**
254      * <p> Enables basic authorization for the autocreated branch. </p>
255      */
SetEnableBasicAuth(bool value)256     inline void SetEnableBasicAuth(bool value) { m_enableBasicAuthHasBeenSet = true; m_enableBasicAuth = value; }
257 
258     /**
259      * <p> Enables basic authorization for the autocreated branch. </p>
260      */
WithEnableBasicAuth(bool value)261     inline AutoBranchCreationConfig& WithEnableBasicAuth(bool value) { SetEnableBasicAuth(value); return *this;}
262 
263 
264     /**
265      * <p>Enables performance mode for the branch.</p> <p>Performance mode optimizes
266      * for faster hosting performance by keeping content cached at the edge for a
267      * longer interval. When performance mode is enabled, hosting configuration or code
268      * changes can take up to 10 minutes to roll out. </p>
269      */
GetEnablePerformanceMode()270     inline bool GetEnablePerformanceMode() const{ return m_enablePerformanceMode; }
271 
272     /**
273      * <p>Enables performance mode for the branch.</p> <p>Performance mode optimizes
274      * for faster hosting performance by keeping content cached at the edge for a
275      * longer interval. When performance mode is enabled, hosting configuration or code
276      * changes can take up to 10 minutes to roll out. </p>
277      */
EnablePerformanceModeHasBeenSet()278     inline bool EnablePerformanceModeHasBeenSet() const { return m_enablePerformanceModeHasBeenSet; }
279 
280     /**
281      * <p>Enables performance mode for the branch.</p> <p>Performance mode optimizes
282      * for faster hosting performance by keeping content cached at the edge for a
283      * longer interval. When performance mode is enabled, hosting configuration or code
284      * changes can take up to 10 minutes to roll out. </p>
285      */
SetEnablePerformanceMode(bool value)286     inline void SetEnablePerformanceMode(bool value) { m_enablePerformanceModeHasBeenSet = true; m_enablePerformanceMode = value; }
287 
288     /**
289      * <p>Enables performance mode for the branch.</p> <p>Performance mode optimizes
290      * for faster hosting performance by keeping content cached at the edge for a
291      * longer interval. When performance mode is enabled, hosting configuration or code
292      * changes can take up to 10 minutes to roll out. </p>
293      */
WithEnablePerformanceMode(bool value)294     inline AutoBranchCreationConfig& WithEnablePerformanceMode(bool value) { SetEnablePerformanceMode(value); return *this;}
295 
296 
297     /**
298      * <p> The build specification (build spec) for the autocreated branch. </p>
299      */
GetBuildSpec()300     inline const Aws::String& GetBuildSpec() const{ return m_buildSpec; }
301 
302     /**
303      * <p> The build specification (build spec) for the autocreated branch. </p>
304      */
BuildSpecHasBeenSet()305     inline bool BuildSpecHasBeenSet() const { return m_buildSpecHasBeenSet; }
306 
307     /**
308      * <p> The build specification (build spec) for the autocreated branch. </p>
309      */
SetBuildSpec(const Aws::String & value)310     inline void SetBuildSpec(const Aws::String& value) { m_buildSpecHasBeenSet = true; m_buildSpec = value; }
311 
312     /**
313      * <p> The build specification (build spec) for the autocreated branch. </p>
314      */
SetBuildSpec(Aws::String && value)315     inline void SetBuildSpec(Aws::String&& value) { m_buildSpecHasBeenSet = true; m_buildSpec = std::move(value); }
316 
317     /**
318      * <p> The build specification (build spec) for the autocreated branch. </p>
319      */
SetBuildSpec(const char * value)320     inline void SetBuildSpec(const char* value) { m_buildSpecHasBeenSet = true; m_buildSpec.assign(value); }
321 
322     /**
323      * <p> The build specification (build spec) for the autocreated branch. </p>
324      */
WithBuildSpec(const Aws::String & value)325     inline AutoBranchCreationConfig& WithBuildSpec(const Aws::String& value) { SetBuildSpec(value); return *this;}
326 
327     /**
328      * <p> The build specification (build spec) for the autocreated branch. </p>
329      */
WithBuildSpec(Aws::String && value)330     inline AutoBranchCreationConfig& WithBuildSpec(Aws::String&& value) { SetBuildSpec(std::move(value)); return *this;}
331 
332     /**
333      * <p> The build specification (build spec) for the autocreated branch. </p>
334      */
WithBuildSpec(const char * value)335     inline AutoBranchCreationConfig& WithBuildSpec(const char* value) { SetBuildSpec(value); return *this;}
336 
337 
338     /**
339      * <p> Enables pull request previews for the autocreated branch. </p>
340      */
GetEnablePullRequestPreview()341     inline bool GetEnablePullRequestPreview() const{ return m_enablePullRequestPreview; }
342 
343     /**
344      * <p> Enables pull request previews for the autocreated branch. </p>
345      */
EnablePullRequestPreviewHasBeenSet()346     inline bool EnablePullRequestPreviewHasBeenSet() const { return m_enablePullRequestPreviewHasBeenSet; }
347 
348     /**
349      * <p> Enables pull request previews for the autocreated branch. </p>
350      */
SetEnablePullRequestPreview(bool value)351     inline void SetEnablePullRequestPreview(bool value) { m_enablePullRequestPreviewHasBeenSet = true; m_enablePullRequestPreview = value; }
352 
353     /**
354      * <p> Enables pull request previews for the autocreated branch. </p>
355      */
WithEnablePullRequestPreview(bool value)356     inline AutoBranchCreationConfig& WithEnablePullRequestPreview(bool value) { SetEnablePullRequestPreview(value); return *this;}
357 
358 
359     /**
360      * <p> The Amplify environment name for the pull request. </p>
361      */
GetPullRequestEnvironmentName()362     inline const Aws::String& GetPullRequestEnvironmentName() const{ return m_pullRequestEnvironmentName; }
363 
364     /**
365      * <p> The Amplify environment name for the pull request. </p>
366      */
PullRequestEnvironmentNameHasBeenSet()367     inline bool PullRequestEnvironmentNameHasBeenSet() const { return m_pullRequestEnvironmentNameHasBeenSet; }
368 
369     /**
370      * <p> The Amplify environment name for the pull request. </p>
371      */
SetPullRequestEnvironmentName(const Aws::String & value)372     inline void SetPullRequestEnvironmentName(const Aws::String& value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName = value; }
373 
374     /**
375      * <p> The Amplify environment name for the pull request. </p>
376      */
SetPullRequestEnvironmentName(Aws::String && value)377     inline void SetPullRequestEnvironmentName(Aws::String&& value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName = std::move(value); }
378 
379     /**
380      * <p> The Amplify environment name for the pull request. </p>
381      */
SetPullRequestEnvironmentName(const char * value)382     inline void SetPullRequestEnvironmentName(const char* value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName.assign(value); }
383 
384     /**
385      * <p> The Amplify environment name for the pull request. </p>
386      */
WithPullRequestEnvironmentName(const Aws::String & value)387     inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(const Aws::String& value) { SetPullRequestEnvironmentName(value); return *this;}
388 
389     /**
390      * <p> The Amplify environment name for the pull request. </p>
391      */
WithPullRequestEnvironmentName(Aws::String && value)392     inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(Aws::String&& value) { SetPullRequestEnvironmentName(std::move(value)); return *this;}
393 
394     /**
395      * <p> The Amplify environment name for the pull request. </p>
396      */
WithPullRequestEnvironmentName(const char * value)397     inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(const char* value) { SetPullRequestEnvironmentName(value); return *this;}
398 
399   private:
400 
401     Stage m_stage;
402     bool m_stageHasBeenSet;
403 
404     Aws::String m_framework;
405     bool m_frameworkHasBeenSet;
406 
407     bool m_enableAutoBuild;
408     bool m_enableAutoBuildHasBeenSet;
409 
410     Aws::Map<Aws::String, Aws::String> m_environmentVariables;
411     bool m_environmentVariablesHasBeenSet;
412 
413     Aws::String m_basicAuthCredentials;
414     bool m_basicAuthCredentialsHasBeenSet;
415 
416     bool m_enableBasicAuth;
417     bool m_enableBasicAuthHasBeenSet;
418 
419     bool m_enablePerformanceMode;
420     bool m_enablePerformanceModeHasBeenSet;
421 
422     Aws::String m_buildSpec;
423     bool m_buildSpecHasBeenSet;
424 
425     bool m_enablePullRequestPreview;
426     bool m_enablePullRequestPreviewHasBeenSet;
427 
428     Aws::String m_pullRequestEnvironmentName;
429     bool m_pullRequestEnvironmentNameHasBeenSet;
430   };
431 
432 } // namespace Model
433 } // namespace Amplify
434 } // namespace Aws
435