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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a network interface for a Scheduled Instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ScheduledInstancesNetworkInterface {
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    /// <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
    pub associate_public_ip_address: ::std::option::Option<bool>,
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub delete_on_termination: ::std::option::Option<bool>,
    /// <p>The description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The index of the device for the network interface attachment.</p>
    pub device_index: ::std::option::Option<i32>,
    /// <p>The IDs of the security groups.</p>
    pub groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub ipv6_address_count: ::std::option::Option<i32>,
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    pub ipv6_addresses: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesIpv6Address>>,
    /// <p>The ID of the network interface.</p>
    pub network_interface_id: ::std::option::Option<::std::string::String>,
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub private_ip_address: ::std::option::Option<::std::string::String>,
    /// <p>The private IPv4 addresses.</p>
    pub private_ip_address_configs: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesPrivateIpAddressConfig>>,
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub secondary_private_ip_address_count: ::std::option::Option<i32>,
    /// <p>The ID of the subnet.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
}
impl ScheduledInstancesNetworkInterface {
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    /// <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
    pub fn associate_public_ip_address(&self) -> ::std::option::Option<bool> {
        self.associate_public_ip_address
    }
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub fn delete_on_termination(&self) -> ::std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The index of the device for the network interface attachment.</p>
    pub fn device_index(&self) -> ::std::option::Option<i32> {
        self.device_index
    }
    /// <p>The IDs of the security groups.</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 `.groups.is_none()`.
    pub fn groups(&self) -> &[::std::string::String] {
        self.groups.as_deref().unwrap_or_default()
    }
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub fn ipv6_address_count(&self) -> ::std::option::Option<i32> {
        self.ipv6_address_count
    }
    /// <p>The specific IPv6 addresses from the subnet range.</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 `.ipv6_addresses.is_none()`.
    pub fn ipv6_addresses(&self) -> &[crate::types::ScheduledInstancesIpv6Address] {
        self.ipv6_addresses.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn private_ip_address(&self) -> ::std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The private IPv4 addresses.</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 `.private_ip_address_configs.is_none()`.
    pub fn private_ip_address_configs(&self) -> &[crate::types::ScheduledInstancesPrivateIpAddressConfig] {
        self.private_ip_address_configs.as_deref().unwrap_or_default()
    }
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub fn secondary_private_ip_address_count(&self) -> ::std::option::Option<i32> {
        self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
}
impl ScheduledInstancesNetworkInterface {
    /// Creates a new builder-style object to manufacture [`ScheduledInstancesNetworkInterface`](crate::types::ScheduledInstancesNetworkInterface).
    pub fn builder() -> crate::types::builders::ScheduledInstancesNetworkInterfaceBuilder {
        crate::types::builders::ScheduledInstancesNetworkInterfaceBuilder::default()
    }
}

/// A builder for [`ScheduledInstancesNetworkInterface`](crate::types::ScheduledInstancesNetworkInterface).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ScheduledInstancesNetworkInterfaceBuilder {
    pub(crate) associate_public_ip_address: ::std::option::Option<bool>,
    pub(crate) delete_on_termination: ::std::option::Option<bool>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) device_index: ::std::option::Option<i32>,
    pub(crate) groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) ipv6_address_count: ::std::option::Option<i32>,
    pub(crate) ipv6_addresses: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesIpv6Address>>,
    pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip_address_configs: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesPrivateIpAddressConfig>>,
    pub(crate) secondary_private_ip_address_count: ::std::option::Option<i32>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
}
impl ScheduledInstancesNetworkInterfaceBuilder {
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    /// <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
    pub fn associate_public_ip_address(mut self, input: bool) -> Self {
        self.associate_public_ip_address = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    /// <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
    pub fn set_associate_public_ip_address(mut self, input: ::std::option::Option<bool>) -> Self {
        self.associate_public_ip_address = input;
        self
    }
    /// <p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>
    /// <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
    pub fn get_associate_public_ip_address(&self) -> &::std::option::Option<bool> {
        &self.associate_public_ip_address
    }
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub fn delete_on_termination(mut self, input: bool) -> Self {
        self.delete_on_termination = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub fn set_delete_on_termination(mut self, input: ::std::option::Option<bool>) -> Self {
        self.delete_on_termination = input;
        self
    }
    /// <p>Indicates whether to delete the interface when the instance is terminated.</p>
    pub fn get_delete_on_termination(&self) -> &::std::option::Option<bool> {
        &self.delete_on_termination
    }
    /// <p>The description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The index of the device for the network interface attachment.</p>
    pub fn device_index(mut self, input: i32) -> Self {
        self.device_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>The index of the device for the network interface attachment.</p>
    pub fn set_device_index(mut self, input: ::std::option::Option<i32>) -> Self {
        self.device_index = input;
        self
    }
    /// <p>The index of the device for the network interface attachment.</p>
    pub fn get_device_index(&self) -> &::std::option::Option<i32> {
        &self.device_index
    }
    /// Appends an item to `groups`.
    ///
    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
    ///
    /// <p>The IDs of the security groups.</p>
    pub fn groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.groups.unwrap_or_default();
        v.push(input.into());
        self.groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the security groups.</p>
    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.groups = input;
        self
    }
    /// <p>The IDs of the security groups.</p>
    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.groups
    }
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub fn ipv6_address_count(mut self, input: i32) -> Self {
        self.ipv6_address_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub fn set_ipv6_address_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ipv6_address_count = input;
        self
    }
    /// <p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>
    pub fn get_ipv6_address_count(&self) -> &::std::option::Option<i32> {
        &self.ipv6_address_count
    }
    /// Appends an item to `ipv6_addresses`.
    ///
    /// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
    ///
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    pub fn ipv6_addresses(mut self, input: crate::types::ScheduledInstancesIpv6Address) -> Self {
        let mut v = self.ipv6_addresses.unwrap_or_default();
        v.push(input);
        self.ipv6_addresses = ::std::option::Option::Some(v);
        self
    }
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    pub fn set_ipv6_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesIpv6Address>>) -> Self {
        self.ipv6_addresses = input;
        self
    }
    /// <p>The specific IPv6 addresses from the subnet range.</p>
    pub fn get_ipv6_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesIpv6Address>> {
        &self.ipv6_addresses
    }
    /// <p>The ID of the network interface.</p>
    pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_interface_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the network interface.</p>
    pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_interface_id = input;
        self
    }
    /// <p>The ID of the network interface.</p>
    pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_interface_id
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn private_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn set_private_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ip_address = input;
        self
    }
    /// <p>The IPv4 address of the network interface within the subnet.</p>
    pub fn get_private_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ip_address
    }
    /// Appends an item to `private_ip_address_configs`.
    ///
    /// To override the contents of this collection use [`set_private_ip_address_configs`](Self::set_private_ip_address_configs).
    ///
    /// <p>The private IPv4 addresses.</p>
    pub fn private_ip_address_configs(mut self, input: crate::types::ScheduledInstancesPrivateIpAddressConfig) -> Self {
        let mut v = self.private_ip_address_configs.unwrap_or_default();
        v.push(input);
        self.private_ip_address_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The private IPv4 addresses.</p>
    pub fn set_private_ip_address_configs(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesPrivateIpAddressConfig>>,
    ) -> Self {
        self.private_ip_address_configs = input;
        self
    }
    /// <p>The private IPv4 addresses.</p>
    pub fn get_private_ip_address_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScheduledInstancesPrivateIpAddressConfig>> {
        &self.private_ip_address_configs
    }
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub fn secondary_private_ip_address_count(mut self, input: i32) -> Self {
        self.secondary_private_ip_address_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub fn set_secondary_private_ip_address_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.secondary_private_ip_address_count = input;
        self
    }
    /// <p>The number of secondary private IPv4 addresses.</p>
    pub fn get_secondary_private_ip_address_count(&self) -> &::std::option::Option<i32> {
        &self.secondary_private_ip_address_count
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the subnet.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The ID of the subnet.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// Consumes the builder and constructs a [`ScheduledInstancesNetworkInterface`](crate::types::ScheduledInstancesNetworkInterface).
    pub fn build(self) -> crate::types::ScheduledInstancesNetworkInterface {
        crate::types::ScheduledInstancesNetworkInterface {
            associate_public_ip_address: self.associate_public_ip_address,
            delete_on_termination: self.delete_on_termination,
            description: self.description,
            device_index: self.device_index,
            groups: self.groups,
            ipv6_address_count: self.ipv6_address_count,
            ipv6_addresses: self.ipv6_addresses,
            network_interface_id: self.network_interface_id,
            private_ip_address: self.private_ip_address,
            private_ip_address_configs: self.private_ip_address_configs,
            secondary_private_ip_address_count: self.secondary_private_ip_address_count,
            subnet_id: self.subnet_id,
        }
    }
}