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/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/ec2/model/Tenancy.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Describes the placement of an instance.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplatePlacementRequest">AWS
30    * API Reference</a></p>
31    */
32   class AWS_EC2_API LaunchTemplatePlacementRequest
33   {
34   public:
35     LaunchTemplatePlacementRequest();
36     LaunchTemplatePlacementRequest(const Aws::Utils::Xml::XmlNode& xmlNode);
37     LaunchTemplatePlacementRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38 
39     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40     void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
43     /**
44      * <p>The Availability Zone for the instance.</p>
45      */
GetAvailabilityZone()46     inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
47 
48     /**
49      * <p>The Availability Zone for the instance.</p>
50      */
AvailabilityZoneHasBeenSet()51     inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
52 
53     /**
54      * <p>The Availability Zone for the instance.</p>
55      */
SetAvailabilityZone(const Aws::String & value)56     inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
57 
58     /**
59      * <p>The Availability Zone for the instance.</p>
60      */
SetAvailabilityZone(Aws::String && value)61     inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
62 
63     /**
64      * <p>The Availability Zone for the instance.</p>
65      */
SetAvailabilityZone(const char * value)66     inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
67 
68     /**
69      * <p>The Availability Zone for the instance.</p>
70      */
WithAvailabilityZone(const Aws::String & value)71     inline LaunchTemplatePlacementRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
72 
73     /**
74      * <p>The Availability Zone for the instance.</p>
75      */
WithAvailabilityZone(Aws::String && value)76     inline LaunchTemplatePlacementRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
77 
78     /**
79      * <p>The Availability Zone for the instance.</p>
80      */
WithAvailabilityZone(const char * value)81     inline LaunchTemplatePlacementRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
82 
83 
84     /**
85      * <p>The affinity setting for an instance on a Dedicated Host.</p>
86      */
GetAffinity()87     inline const Aws::String& GetAffinity() const{ return m_affinity; }
88 
89     /**
90      * <p>The affinity setting for an instance on a Dedicated Host.</p>
91      */
AffinityHasBeenSet()92     inline bool AffinityHasBeenSet() const { return m_affinityHasBeenSet; }
93 
94     /**
95      * <p>The affinity setting for an instance on a Dedicated Host.</p>
96      */
SetAffinity(const Aws::String & value)97     inline void SetAffinity(const Aws::String& value) { m_affinityHasBeenSet = true; m_affinity = value; }
98 
99     /**
100      * <p>The affinity setting for an instance on a Dedicated Host.</p>
101      */
SetAffinity(Aws::String && value)102     inline void SetAffinity(Aws::String&& value) { m_affinityHasBeenSet = true; m_affinity = std::move(value); }
103 
104     /**
105      * <p>The affinity setting for an instance on a Dedicated Host.</p>
106      */
SetAffinity(const char * value)107     inline void SetAffinity(const char* value) { m_affinityHasBeenSet = true; m_affinity.assign(value); }
108 
109     /**
110      * <p>The affinity setting for an instance on a Dedicated Host.</p>
111      */
WithAffinity(const Aws::String & value)112     inline LaunchTemplatePlacementRequest& WithAffinity(const Aws::String& value) { SetAffinity(value); return *this;}
113 
114     /**
115      * <p>The affinity setting for an instance on a Dedicated Host.</p>
116      */
WithAffinity(Aws::String && value)117     inline LaunchTemplatePlacementRequest& WithAffinity(Aws::String&& value) { SetAffinity(std::move(value)); return *this;}
118 
119     /**
120      * <p>The affinity setting for an instance on a Dedicated Host.</p>
121      */
WithAffinity(const char * value)122     inline LaunchTemplatePlacementRequest& WithAffinity(const char* value) { SetAffinity(value); return *this;}
123 
124 
125     /**
126      * <p>The name of the placement group for the instance.</p>
127      */
GetGroupName()128     inline const Aws::String& GetGroupName() const{ return m_groupName; }
129 
130     /**
131      * <p>The name of the placement group for the instance.</p>
132      */
GroupNameHasBeenSet()133     inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
134 
135     /**
136      * <p>The name of the placement group for the instance.</p>
137      */
SetGroupName(const Aws::String & value)138     inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; }
139 
140     /**
141      * <p>The name of the placement group for the instance.</p>
142      */
SetGroupName(Aws::String && value)143     inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); }
144 
145     /**
146      * <p>The name of the placement group for the instance.</p>
147      */
SetGroupName(const char * value)148     inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); }
149 
150     /**
151      * <p>The name of the placement group for the instance.</p>
152      */
WithGroupName(const Aws::String & value)153     inline LaunchTemplatePlacementRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;}
154 
155     /**
156      * <p>The name of the placement group for the instance.</p>
157      */
WithGroupName(Aws::String && value)158     inline LaunchTemplatePlacementRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;}
159 
160     /**
161      * <p>The name of the placement group for the instance.</p>
162      */
WithGroupName(const char * value)163     inline LaunchTemplatePlacementRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;}
164 
165 
166     /**
167      * <p>The ID of the Dedicated Host for the instance.</p>
168      */
GetHostId()169     inline const Aws::String& GetHostId() const{ return m_hostId; }
170 
171     /**
172      * <p>The ID of the Dedicated Host for the instance.</p>
173      */
HostIdHasBeenSet()174     inline bool HostIdHasBeenSet() const { return m_hostIdHasBeenSet; }
175 
176     /**
177      * <p>The ID of the Dedicated Host for the instance.</p>
178      */
SetHostId(const Aws::String & value)179     inline void SetHostId(const Aws::String& value) { m_hostIdHasBeenSet = true; m_hostId = value; }
180 
181     /**
182      * <p>The ID of the Dedicated Host for the instance.</p>
183      */
SetHostId(Aws::String && value)184     inline void SetHostId(Aws::String&& value) { m_hostIdHasBeenSet = true; m_hostId = std::move(value); }
185 
186     /**
187      * <p>The ID of the Dedicated Host for the instance.</p>
188      */
SetHostId(const char * value)189     inline void SetHostId(const char* value) { m_hostIdHasBeenSet = true; m_hostId.assign(value); }
190 
191     /**
192      * <p>The ID of the Dedicated Host for the instance.</p>
193      */
WithHostId(const Aws::String & value)194     inline LaunchTemplatePlacementRequest& WithHostId(const Aws::String& value) { SetHostId(value); return *this;}
195 
196     /**
197      * <p>The ID of the Dedicated Host for the instance.</p>
198      */
WithHostId(Aws::String && value)199     inline LaunchTemplatePlacementRequest& WithHostId(Aws::String&& value) { SetHostId(std::move(value)); return *this;}
200 
201     /**
202      * <p>The ID of the Dedicated Host for the instance.</p>
203      */
WithHostId(const char * value)204     inline LaunchTemplatePlacementRequest& WithHostId(const char* value) { SetHostId(value); return *this;}
205 
206 
207     /**
208      * <p>The tenancy of the instance (if the instance is running in a VPC). An
209      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
210      */
GetTenancy()211     inline const Tenancy& GetTenancy() const{ return m_tenancy; }
212 
213     /**
214      * <p>The tenancy of the instance (if the instance is running in a VPC). An
215      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
216      */
TenancyHasBeenSet()217     inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; }
218 
219     /**
220      * <p>The tenancy of the instance (if the instance is running in a VPC). An
221      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
222      */
SetTenancy(const Tenancy & value)223     inline void SetTenancy(const Tenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; }
224 
225     /**
226      * <p>The tenancy of the instance (if the instance is running in a VPC). An
227      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
228      */
SetTenancy(Tenancy && value)229     inline void SetTenancy(Tenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); }
230 
231     /**
232      * <p>The tenancy of the instance (if the instance is running in a VPC). An
233      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
234      */
WithTenancy(const Tenancy & value)235     inline LaunchTemplatePlacementRequest& WithTenancy(const Tenancy& value) { SetTenancy(value); return *this;}
236 
237     /**
238      * <p>The tenancy of the instance (if the instance is running in a VPC). An
239      * instance with a tenancy of dedicated runs on single-tenant hardware.</p>
240      */
WithTenancy(Tenancy && value)241     inline LaunchTemplatePlacementRequest& WithTenancy(Tenancy&& value) { SetTenancy(std::move(value)); return *this;}
242 
243 
244     /**
245      * <p>Reserved for future use.</p>
246      */
GetSpreadDomain()247     inline const Aws::String& GetSpreadDomain() const{ return m_spreadDomain; }
248 
249     /**
250      * <p>Reserved for future use.</p>
251      */
SpreadDomainHasBeenSet()252     inline bool SpreadDomainHasBeenSet() const { return m_spreadDomainHasBeenSet; }
253 
254     /**
255      * <p>Reserved for future use.</p>
256      */
SetSpreadDomain(const Aws::String & value)257     inline void SetSpreadDomain(const Aws::String& value) { m_spreadDomainHasBeenSet = true; m_spreadDomain = value; }
258 
259     /**
260      * <p>Reserved for future use.</p>
261      */
SetSpreadDomain(Aws::String && value)262     inline void SetSpreadDomain(Aws::String&& value) { m_spreadDomainHasBeenSet = true; m_spreadDomain = std::move(value); }
263 
264     /**
265      * <p>Reserved for future use.</p>
266      */
SetSpreadDomain(const char * value)267     inline void SetSpreadDomain(const char* value) { m_spreadDomainHasBeenSet = true; m_spreadDomain.assign(value); }
268 
269     /**
270      * <p>Reserved for future use.</p>
271      */
WithSpreadDomain(const Aws::String & value)272     inline LaunchTemplatePlacementRequest& WithSpreadDomain(const Aws::String& value) { SetSpreadDomain(value); return *this;}
273 
274     /**
275      * <p>Reserved for future use.</p>
276      */
WithSpreadDomain(Aws::String && value)277     inline LaunchTemplatePlacementRequest& WithSpreadDomain(Aws::String&& value) { SetSpreadDomain(std::move(value)); return *this;}
278 
279     /**
280      * <p>Reserved for future use.</p>
281      */
WithSpreadDomain(const char * value)282     inline LaunchTemplatePlacementRequest& WithSpreadDomain(const char* value) { SetSpreadDomain(value); return *this;}
283 
284 
285     /**
286      * <p>The ARN of the host resource group in which to launch the instances. If you
287      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
288      * to <code>host</code>.</p>
289      */
GetHostResourceGroupArn()290     inline const Aws::String& GetHostResourceGroupArn() const{ return m_hostResourceGroupArn; }
291 
292     /**
293      * <p>The ARN of the host resource group in which to launch the instances. If you
294      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
295      * to <code>host</code>.</p>
296      */
HostResourceGroupArnHasBeenSet()297     inline bool HostResourceGroupArnHasBeenSet() const { return m_hostResourceGroupArnHasBeenSet; }
298 
299     /**
300      * <p>The ARN of the host resource group in which to launch the instances. If you
301      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
302      * to <code>host</code>.</p>
303      */
SetHostResourceGroupArn(const Aws::String & value)304     inline void SetHostResourceGroupArn(const Aws::String& value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn = value; }
305 
306     /**
307      * <p>The ARN of the host resource group in which to launch the instances. If you
308      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
309      * to <code>host</code>.</p>
310      */
SetHostResourceGroupArn(Aws::String && value)311     inline void SetHostResourceGroupArn(Aws::String&& value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn = std::move(value); }
312 
313     /**
314      * <p>The ARN of the host resource group in which to launch the instances. If you
315      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
316      * to <code>host</code>.</p>
317      */
SetHostResourceGroupArn(const char * value)318     inline void SetHostResourceGroupArn(const char* value) { m_hostResourceGroupArnHasBeenSet = true; m_hostResourceGroupArn.assign(value); }
319 
320     /**
321      * <p>The ARN of the host resource group in which to launch the instances. If you
322      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
323      * to <code>host</code>.</p>
324      */
WithHostResourceGroupArn(const Aws::String & value)325     inline LaunchTemplatePlacementRequest& WithHostResourceGroupArn(const Aws::String& value) { SetHostResourceGroupArn(value); return *this;}
326 
327     /**
328      * <p>The ARN of the host resource group in which to launch the instances. If you
329      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
330      * to <code>host</code>.</p>
331      */
WithHostResourceGroupArn(Aws::String && value)332     inline LaunchTemplatePlacementRequest& WithHostResourceGroupArn(Aws::String&& value) { SetHostResourceGroupArn(std::move(value)); return *this;}
333 
334     /**
335      * <p>The ARN of the host resource group in which to launch the instances. If you
336      * specify a host resource group ARN, omit the <b>Tenancy</b> parameter or set it
337      * to <code>host</code>.</p>
338      */
WithHostResourceGroupArn(const char * value)339     inline LaunchTemplatePlacementRequest& WithHostResourceGroupArn(const char* value) { SetHostResourceGroupArn(value); return *this;}
340 
341 
342     /**
343      * <p>The number of the partition the instance should launch in. Valid only if the
344      * placement group strategy is set to <code>partition</code>.</p>
345      */
GetPartitionNumber()346     inline int GetPartitionNumber() const{ return m_partitionNumber; }
347 
348     /**
349      * <p>The number of the partition the instance should launch in. Valid only if the
350      * placement group strategy is set to <code>partition</code>.</p>
351      */
PartitionNumberHasBeenSet()352     inline bool PartitionNumberHasBeenSet() const { return m_partitionNumberHasBeenSet; }
353 
354     /**
355      * <p>The number of the partition the instance should launch in. Valid only if the
356      * placement group strategy is set to <code>partition</code>.</p>
357      */
SetPartitionNumber(int value)358     inline void SetPartitionNumber(int value) { m_partitionNumberHasBeenSet = true; m_partitionNumber = value; }
359 
360     /**
361      * <p>The number of the partition the instance should launch in. Valid only if the
362      * placement group strategy is set to <code>partition</code>.</p>
363      */
WithPartitionNumber(int value)364     inline LaunchTemplatePlacementRequest& WithPartitionNumber(int value) { SetPartitionNumber(value); return *this;}
365 
366   private:
367 
368     Aws::String m_availabilityZone;
369     bool m_availabilityZoneHasBeenSet;
370 
371     Aws::String m_affinity;
372     bool m_affinityHasBeenSet;
373 
374     Aws::String m_groupName;
375     bool m_groupNameHasBeenSet;
376 
377     Aws::String m_hostId;
378     bool m_hostIdHasBeenSet;
379 
380     Tenancy m_tenancy;
381     bool m_tenancyHasBeenSet;
382 
383     Aws::String m_spreadDomain;
384     bool m_spreadDomainHasBeenSet;
385 
386     Aws::String m_hostResourceGroupArn;
387     bool m_hostResourceGroupArnHasBeenSet;
388 
389     int m_partitionNumber;
390     bool m_partitionNumberHasBeenSet;
391   };
392 
393 } // namespace Model
394 } // namespace EC2
395 } // namespace Aws
396