aws-sdk-ec2 1.224.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the properties of the Dedicated Host.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Host {
    /// <p>Whether auto-placement is on or off.</p>
    pub auto_placement: ::std::option::Option<crate::types::AutoPlacement>,
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub available_capacity: ::std::option::Option<crate::types::AvailableCapacity>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Dedicated Host.</p>
    pub host_id: ::std::option::Option<::std::string::String>,
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub host_properties: ::std::option::Option<crate::types::HostProperties>,
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub host_reservation_id: ::std::option::Option<::std::string::String>,
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    pub instances: ::std::option::Option<::std::vec::Vec<crate::types::HostInstance>>,
    /// <p>The Dedicated Host's state.</p>
    pub state: ::std::option::Option<crate::types::AllocationState>,
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub allocation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time that the Dedicated Host was released.</p>
    pub release_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Any tags assigned to the Dedicated Host.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub host_recovery: ::std::option::Option<crate::types::HostRecovery>,
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub allows_multiple_instance_types: ::std::option::Option<crate::types::AllowsMultipleInstanceTypes>,
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub availability_zone_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub member_of_service_linked_resource_group: ::std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether host maintenance is enabled or disabled for the Dedicated Host.</p>
    pub host_maintenance: ::std::option::Option<crate::types::HostMaintenance>,
    /// <p>The ID of the Outpost hardware asset on which the Dedicated Host is allocated.</p>
    pub asset_id: ::std::option::Option<::std::string::String>,
}
impl Host {
    /// <p>Whether auto-placement is on or off.</p>
    pub fn auto_placement(&self) -> ::std::option::Option<&crate::types::AutoPlacement> {
        self.auto_placement.as_ref()
    }
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub fn available_capacity(&self) -> ::std::option::Option<&crate::types::AvailableCapacity> {
        self.available_capacity.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The ID of the Dedicated Host.</p>
    pub fn host_id(&self) -> ::std::option::Option<&str> {
        self.host_id.as_deref()
    }
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub fn host_properties(&self) -> ::std::option::Option<&crate::types::HostProperties> {
        self.host_properties.as_ref()
    }
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub fn host_reservation_id(&self) -> ::std::option::Option<&str> {
        self.host_reservation_id.as_deref()
    }
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.instances.is_none()`.
    pub fn instances(&self) -> &[crate::types::HostInstance] {
        self.instances.as_deref().unwrap_or_default()
    }
    /// <p>The Dedicated Host's state.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::AllocationState> {
        self.state.as_ref()
    }
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub fn allocation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.allocation_time.as_ref()
    }
    /// <p>The time that the Dedicated Host was released.</p>
    pub fn release_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.release_time.as_ref()
    }
    /// <p>Any tags assigned to the Dedicated Host.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub fn host_recovery(&self) -> ::std::option::Option<&crate::types::HostRecovery> {
        self.host_recovery.as_ref()
    }
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub fn allows_multiple_instance_types(&self) -> ::std::option::Option<&crate::types::AllowsMultipleInstanceTypes> {
        self.allows_multiple_instance_types.as_ref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub fn member_of_service_linked_resource_group(&self) -> ::std::option::Option<bool> {
        self.member_of_service_linked_resource_group
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Indicates whether host maintenance is enabled or disabled for the Dedicated Host.</p>
    pub fn host_maintenance(&self) -> ::std::option::Option<&crate::types::HostMaintenance> {
        self.host_maintenance.as_ref()
    }
    /// <p>The ID of the Outpost hardware asset on which the Dedicated Host is allocated.</p>
    pub fn asset_id(&self) -> ::std::option::Option<&str> {
        self.asset_id.as_deref()
    }
}
impl Host {
    /// Creates a new builder-style object to manufacture [`Host`](crate::types::Host).
    pub fn builder() -> crate::types::builders::HostBuilder {
        crate::types::builders::HostBuilder::default()
    }
}

/// A builder for [`Host`](crate::types::Host).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HostBuilder {
    pub(crate) auto_placement: ::std::option::Option<crate::types::AutoPlacement>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) available_capacity: ::std::option::Option<crate::types::AvailableCapacity>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) host_id: ::std::option::Option<::std::string::String>,
    pub(crate) host_properties: ::std::option::Option<crate::types::HostProperties>,
    pub(crate) host_reservation_id: ::std::option::Option<::std::string::String>,
    pub(crate) instances: ::std::option::Option<::std::vec::Vec<crate::types::HostInstance>>,
    pub(crate) state: ::std::option::Option<crate::types::AllocationState>,
    pub(crate) allocation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) release_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) host_recovery: ::std::option::Option<crate::types::HostRecovery>,
    pub(crate) allows_multiple_instance_types: ::std::option::Option<crate::types::AllowsMultipleInstanceTypes>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) member_of_service_linked_resource_group: ::std::option::Option<bool>,
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) host_maintenance: ::std::option::Option<crate::types::HostMaintenance>,
    pub(crate) asset_id: ::std::option::Option<::std::string::String>,
}
impl HostBuilder {
    /// <p>Whether auto-placement is on or off.</p>
    pub fn auto_placement(mut self, input: crate::types::AutoPlacement) -> Self {
        self.auto_placement = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether auto-placement is on or off.</p>
    pub fn set_auto_placement(mut self, input: ::std::option::Option<crate::types::AutoPlacement>) -> Self {
        self.auto_placement = input;
        self
    }
    /// <p>Whether auto-placement is on or off.</p>
    pub fn get_auto_placement(&self) -> &::std::option::Option<crate::types::AutoPlacement> {
        &self.auto_placement
    }
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone of the Dedicated Host.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub fn available_capacity(mut self, input: crate::types::AvailableCapacity) -> Self {
        self.available_capacity = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub fn set_available_capacity(mut self, input: ::std::option::Option<crate::types::AvailableCapacity>) -> Self {
        self.available_capacity = input;
        self
    }
    /// <p>Information about the instances running on the Dedicated Host.</p>
    pub fn get_available_capacity(&self) -> &::std::option::Option<crate::types::AvailableCapacity> {
        &self.available_capacity
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The ID of the Dedicated Host.</p>
    pub fn host_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Dedicated Host.</p>
    pub fn set_host_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_id = input;
        self
    }
    /// <p>The ID of the Dedicated Host.</p>
    pub fn get_host_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_id
    }
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub fn host_properties(mut self, input: crate::types::HostProperties) -> Self {
        self.host_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub fn set_host_properties(mut self, input: ::std::option::Option<crate::types::HostProperties>) -> Self {
        self.host_properties = input;
        self
    }
    /// <p>The hardware specifications of the Dedicated Host.</p>
    pub fn get_host_properties(&self) -> &::std::option::Option<crate::types::HostProperties> {
        &self.host_properties
    }
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub fn host_reservation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_reservation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub fn set_host_reservation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_reservation_id = input;
        self
    }
    /// <p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>
    pub fn get_host_reservation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_reservation_id
    }
    /// Appends an item to `instances`.
    ///
    /// To override the contents of this collection use [`set_instances`](Self::set_instances).
    ///
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    pub fn instances(mut self, input: crate::types::HostInstance) -> Self {
        let mut v = self.instances.unwrap_or_default();
        v.push(input);
        self.instances = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    pub fn set_instances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HostInstance>>) -> Self {
        self.instances = input;
        self
    }
    /// <p>The IDs and instance type that are currently running on the Dedicated Host.</p>
    pub fn get_instances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HostInstance>> {
        &self.instances
    }
    /// <p>The Dedicated Host's state.</p>
    pub fn state(mut self, input: crate::types::AllocationState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Dedicated Host's state.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::AllocationState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The Dedicated Host's state.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::AllocationState> {
        &self.state
    }
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub fn allocation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.allocation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub fn set_allocation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.allocation_time = input;
        self
    }
    /// <p>The time that the Dedicated Host was allocated.</p>
    pub fn get_allocation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.allocation_time
    }
    /// <p>The time that the Dedicated Host was released.</p>
    pub fn release_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.release_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the Dedicated Host was released.</p>
    pub fn set_release_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.release_time = input;
        self
    }
    /// <p>The time that the Dedicated Host was released.</p>
    pub fn get_release_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.release_time
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the Dedicated Host.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any tags assigned to the Dedicated Host.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the Dedicated Host.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub fn host_recovery(mut self, input: crate::types::HostRecovery) -> Self {
        self.host_recovery = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub fn set_host_recovery(mut self, input: ::std::option::Option<crate::types::HostRecovery>) -> Self {
        self.host_recovery = input;
        self
    }
    /// <p>Indicates whether host recovery is enabled or disabled for the Dedicated Host.</p>
    pub fn get_host_recovery(&self) -> &::std::option::Option<crate::types::HostRecovery> {
        &self.host_recovery
    }
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub fn allows_multiple_instance_types(mut self, input: crate::types::AllowsMultipleInstanceTypes) -> Self {
        self.allows_multiple_instance_types = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub fn set_allows_multiple_instance_types(mut self, input: ::std::option::Option<crate::types::AllowsMultipleInstanceTypes>) -> Self {
        self.allows_multiple_instance_types = input;
        self
    }
    /// <p>Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is <code>on</code>, the Dedicated Host supports multiple instance types in the instance family. If the value is <code>off</code>, the Dedicated Host supports a single instance type only.</p>
    pub fn get_allows_multiple_instance_types(&self) -> &::std::option::Option<crate::types::AllowsMultipleInstanceTypes> {
        &self.allows_multiple_instance_types
    }
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the Dedicated Host.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone_id = input;
        self
    }
    /// <p>The ID of the Availability Zone in which the Dedicated Host is allocated.</p>
    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone_id
    }
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub fn member_of_service_linked_resource_group(mut self, input: bool) -> Self {
        self.member_of_service_linked_resource_group = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub fn set_member_of_service_linked_resource_group(mut self, input: ::std::option::Option<bool>) -> Self {
        self.member_of_service_linked_resource_group = input;
        self
    }
    /// <p>Indicates whether the Dedicated Host is in a host resource group. If <b>memberOfServiceLinkedResourceGroup</b> is <code>true</code>, the host is in a host resource group; otherwise, it is not.</p>
    pub fn get_member_of_service_linked_resource_group(&self) -> &::std::option::Option<bool> {
        &self.member_of_service_linked_resource_group
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// <p>Indicates whether host maintenance is enabled or disabled for the Dedicated Host.</p>
    pub fn host_maintenance(mut self, input: crate::types::HostMaintenance) -> Self {
        self.host_maintenance = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether host maintenance is enabled or disabled for the Dedicated Host.</p>
    pub fn set_host_maintenance(mut self, input: ::std::option::Option<crate::types::HostMaintenance>) -> Self {
        self.host_maintenance = input;
        self
    }
    /// <p>Indicates whether host maintenance is enabled or disabled for the Dedicated Host.</p>
    pub fn get_host_maintenance(&self) -> &::std::option::Option<crate::types::HostMaintenance> {
        &self.host_maintenance
    }
    /// <p>The ID of the Outpost hardware asset on which the Dedicated Host is allocated.</p>
    pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.asset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Outpost hardware asset on which the Dedicated Host is allocated.</p>
    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.asset_id = input;
        self
    }
    /// <p>The ID of the Outpost hardware asset on which the Dedicated Host is allocated.</p>
    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.asset_id
    }
    /// Consumes the builder and constructs a [`Host`](crate::types::Host).
    pub fn build(self) -> crate::types::Host {
        crate::types::Host {
            auto_placement: self.auto_placement,
            availability_zone: self.availability_zone,
            available_capacity: self.available_capacity,
            client_token: self.client_token,
            host_id: self.host_id,
            host_properties: self.host_properties,
            host_reservation_id: self.host_reservation_id,
            instances: self.instances,
            state: self.state,
            allocation_time: self.allocation_time,
            release_time: self.release_time,
            tags: self.tags,
            host_recovery: self.host_recovery,
            allows_multiple_instance_types: self.allows_multiple_instance_types,
            owner_id: self.owner_id,
            availability_zone_id: self.availability_zone_id,
            member_of_service_linked_resource_group: self.member_of_service_linked_resource_group,
            outpost_arn: self.outpost_arn,
            host_maintenance: self.host_maintenance,
            asset_id: self.asset_id,
        }
    }
}