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/batch/Batch_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace Batch
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>An object representing a launch template associated with a compute resource.
28    * You must specify either the launch template ID or launch template name in the
29    * request, but not both.</p> <p>If security groups are specified using both the
30    * <code>securityGroupIds</code> parameter of <code>CreateComputeEnvironment</code>
31    * and the launch template, the values in the <code>securityGroupIds</code>
32    * parameter of <code>CreateComputeEnvironment</code> will be used.</p>
33    * <p>This object isn't applicable to jobs that are running on Fargate
34    * resources.</p> <p><h3>See Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/LaunchTemplateSpecification">AWS
36    * API Reference</a></p>
37    */
38   class AWS_BATCH_API LaunchTemplateSpecification
39   {
40   public:
41     LaunchTemplateSpecification();
42     LaunchTemplateSpecification(Aws::Utils::Json::JsonView jsonValue);
43     LaunchTemplateSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
44     Aws::Utils::Json::JsonValue Jsonize() const;
45 
46 
47     /**
48      * <p>The ID of the launch template.</p>
49      */
GetLaunchTemplateId()50     inline const Aws::String& GetLaunchTemplateId() const{ return m_launchTemplateId; }
51 
52     /**
53      * <p>The ID of the launch template.</p>
54      */
LaunchTemplateIdHasBeenSet()55     inline bool LaunchTemplateIdHasBeenSet() const { return m_launchTemplateIdHasBeenSet; }
56 
57     /**
58      * <p>The ID of the launch template.</p>
59      */
SetLaunchTemplateId(const Aws::String & value)60     inline void SetLaunchTemplateId(const Aws::String& value) { m_launchTemplateIdHasBeenSet = true; m_launchTemplateId = value; }
61 
62     /**
63      * <p>The ID of the launch template.</p>
64      */
SetLaunchTemplateId(Aws::String && value)65     inline void SetLaunchTemplateId(Aws::String&& value) { m_launchTemplateIdHasBeenSet = true; m_launchTemplateId = std::move(value); }
66 
67     /**
68      * <p>The ID of the launch template.</p>
69      */
SetLaunchTemplateId(const char * value)70     inline void SetLaunchTemplateId(const char* value) { m_launchTemplateIdHasBeenSet = true; m_launchTemplateId.assign(value); }
71 
72     /**
73      * <p>The ID of the launch template.</p>
74      */
WithLaunchTemplateId(const Aws::String & value)75     inline LaunchTemplateSpecification& WithLaunchTemplateId(const Aws::String& value) { SetLaunchTemplateId(value); return *this;}
76 
77     /**
78      * <p>The ID of the launch template.</p>
79      */
WithLaunchTemplateId(Aws::String && value)80     inline LaunchTemplateSpecification& WithLaunchTemplateId(Aws::String&& value) { SetLaunchTemplateId(std::move(value)); return *this;}
81 
82     /**
83      * <p>The ID of the launch template.</p>
84      */
WithLaunchTemplateId(const char * value)85     inline LaunchTemplateSpecification& WithLaunchTemplateId(const char* value) { SetLaunchTemplateId(value); return *this;}
86 
87 
88     /**
89      * <p>The name of the launch template.</p>
90      */
GetLaunchTemplateName()91     inline const Aws::String& GetLaunchTemplateName() const{ return m_launchTemplateName; }
92 
93     /**
94      * <p>The name of the launch template.</p>
95      */
LaunchTemplateNameHasBeenSet()96     inline bool LaunchTemplateNameHasBeenSet() const { return m_launchTemplateNameHasBeenSet; }
97 
98     /**
99      * <p>The name of the launch template.</p>
100      */
SetLaunchTemplateName(const Aws::String & value)101     inline void SetLaunchTemplateName(const Aws::String& value) { m_launchTemplateNameHasBeenSet = true; m_launchTemplateName = value; }
102 
103     /**
104      * <p>The name of the launch template.</p>
105      */
SetLaunchTemplateName(Aws::String && value)106     inline void SetLaunchTemplateName(Aws::String&& value) { m_launchTemplateNameHasBeenSet = true; m_launchTemplateName = std::move(value); }
107 
108     /**
109      * <p>The name of the launch template.</p>
110      */
SetLaunchTemplateName(const char * value)111     inline void SetLaunchTemplateName(const char* value) { m_launchTemplateNameHasBeenSet = true; m_launchTemplateName.assign(value); }
112 
113     /**
114      * <p>The name of the launch template.</p>
115      */
WithLaunchTemplateName(const Aws::String & value)116     inline LaunchTemplateSpecification& WithLaunchTemplateName(const Aws::String& value) { SetLaunchTemplateName(value); return *this;}
117 
118     /**
119      * <p>The name of the launch template.</p>
120      */
WithLaunchTemplateName(Aws::String && value)121     inline LaunchTemplateSpecification& WithLaunchTemplateName(Aws::String&& value) { SetLaunchTemplateName(std::move(value)); return *this;}
122 
123     /**
124      * <p>The name of the launch template.</p>
125      */
WithLaunchTemplateName(const char * value)126     inline LaunchTemplateSpecification& WithLaunchTemplateName(const char* value) { SetLaunchTemplateName(value); return *this;}
127 
128 
129     /**
130      * <p>The version number of the launch template, <code>$Latest</code>, or
131      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
132      * version of the launch template is used. If the value is <code>$Default</code>,
133      * the default version of the launch template is used.</p>  <p>After the
134      * compute environment is created, the launch template version that's used isn't
135      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
136      * the launch template is updated. To use a new launch template version, create a
137      * new compute environment, add the new compute environment to the existing job
138      * queue, remove the old compute environment from the job queue, and delete the old
139      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
140      */
GetVersion()141     inline const Aws::String& GetVersion() const{ return m_version; }
142 
143     /**
144      * <p>The version number of the launch template, <code>$Latest</code>, or
145      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
146      * version of the launch template is used. If the value is <code>$Default</code>,
147      * the default version of the launch template is used.</p>  <p>After the
148      * compute environment is created, the launch template version that's used isn't
149      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
150      * the launch template is updated. To use a new launch template version, create a
151      * new compute environment, add the new compute environment to the existing job
152      * queue, remove the old compute environment from the job queue, and delete the old
153      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
154      */
VersionHasBeenSet()155     inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
156 
157     /**
158      * <p>The version number of the launch template, <code>$Latest</code>, or
159      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
160      * version of the launch template is used. If the value is <code>$Default</code>,
161      * the default version of the launch template is used.</p>  <p>After the
162      * compute environment is created, the launch template version that's used isn't
163      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
164      * the launch template is updated. To use a new launch template version, create a
165      * new compute environment, add the new compute environment to the existing job
166      * queue, remove the old compute environment from the job queue, and delete the old
167      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
168      */
SetVersion(const Aws::String & value)169     inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; }
170 
171     /**
172      * <p>The version number of the launch template, <code>$Latest</code>, or
173      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
174      * version of the launch template is used. If the value is <code>$Default</code>,
175      * the default version of the launch template is used.</p>  <p>After the
176      * compute environment is created, the launch template version that's used isn't
177      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
178      * the launch template is updated. To use a new launch template version, create a
179      * new compute environment, add the new compute environment to the existing job
180      * queue, remove the old compute environment from the job queue, and delete the old
181      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
182      */
SetVersion(Aws::String && value)183     inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); }
184 
185     /**
186      * <p>The version number of the launch template, <code>$Latest</code>, or
187      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
188      * version of the launch template is used. If the value is <code>$Default</code>,
189      * the default version of the launch template is used.</p>  <p>After the
190      * compute environment is created, the launch template version that's used isn't
191      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
192      * the launch template is updated. To use a new launch template version, create a
193      * new compute environment, add the new compute environment to the existing job
194      * queue, remove the old compute environment from the job queue, and delete the old
195      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
196      */
SetVersion(const char * value)197     inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); }
198 
199     /**
200      * <p>The version number of the launch template, <code>$Latest</code>, or
201      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
202      * version of the launch template is used. If the value is <code>$Default</code>,
203      * the default version of the launch template is used.</p>  <p>After the
204      * compute environment is created, the launch template version that's used isn't
205      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
206      * the launch template is updated. To use a new launch template version, create a
207      * new compute environment, add the new compute environment to the existing job
208      * queue, remove the old compute environment from the job queue, and delete the old
209      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
210      */
WithVersion(const Aws::String & value)211     inline LaunchTemplateSpecification& WithVersion(const Aws::String& value) { SetVersion(value); return *this;}
212 
213     /**
214      * <p>The version number of the launch template, <code>$Latest</code>, or
215      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
216      * version of the launch template is used. If the value is <code>$Default</code>,
217      * the default version of the launch template is used.</p>  <p>After the
218      * compute environment is created, the launch template version that's used isn't
219      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
220      * the launch template is updated. To use a new launch template version, create a
221      * new compute environment, add the new compute environment to the existing job
222      * queue, remove the old compute environment from the job queue, and delete the old
223      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
224      */
WithVersion(Aws::String && value)225     inline LaunchTemplateSpecification& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;}
226 
227     /**
228      * <p>The version number of the launch template, <code>$Latest</code>, or
229      * <code>$Default</code>.</p> <p>If the value is <code>$Latest</code>, the latest
230      * version of the launch template is used. If the value is <code>$Default</code>,
231      * the default version of the launch template is used.</p>  <p>After the
232      * compute environment is created, the launch template version that's used isn't
233      * changed, even if the <code>$Default</code> or <code>$Latest</code> version for
234      * the launch template is updated. To use a new launch template version, create a
235      * new compute environment, add the new compute environment to the existing job
236      * queue, remove the old compute environment from the job queue, and delete the old
237      * compute environment.</p>  <p>Default: <code>$Default</code>.</p>
238      */
WithVersion(const char * value)239     inline LaunchTemplateSpecification& WithVersion(const char* value) { SetVersion(value); return *this;}
240 
241   private:
242 
243     Aws::String m_launchTemplateId;
244     bool m_launchTemplateIdHasBeenSet;
245 
246     Aws::String m_launchTemplateName;
247     bool m_launchTemplateNameHasBeenSet;
248 
249     Aws::String m_version;
250     bool m_versionHasBeenSet;
251   };
252 
253 } // namespace Model
254 } // namespace Batch
255 } // namespace Aws
256