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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssignIpv6AddressesInput {
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub ipv6_prefix_count: ::std::option::Option<i32>,
/// <p>One or more IPv6 prefixes assigned to the network interface. You can't use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub ipv6_prefixes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The ID of the network interface.</p>
pub network_interface_id: ::std::option::Option<::std::string::String>,
/// <p>The IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub ipv6_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
pub ipv6_address_count: ::std::option::Option<i32>,
}
impl AssignIpv6AddressesInput {
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn ipv6_prefix_count(&self) -> ::std::option::Option<i32> {
self.ipv6_prefix_count
}
/// <p>One or more IPv6 prefixes assigned to the network interface. You can't use this option if you use the <code>Ipv6PrefixCount</code> option.</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_prefixes.is_none()`.
pub fn ipv6_prefixes(&self) -> &[::std::string::String] {
self.ipv6_prefixes.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 IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 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 `.ipv6_addresses.is_none()`.
pub fn ipv6_addresses(&self) -> &[::std::string::String] {
self.ipv6_addresses.as_deref().unwrap_or_default()
}
/// <p>The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
pub fn ipv6_address_count(&self) -> ::std::option::Option<i32> {
self.ipv6_address_count
}
}
impl AssignIpv6AddressesInput {
/// Creates a new builder-style object to manufacture [`AssignIpv6AddressesInput`](crate::operation::assign_ipv6_addresses::AssignIpv6AddressesInput).
pub fn builder() -> crate::operation::assign_ipv6_addresses::builders::AssignIpv6AddressesInputBuilder {
crate::operation::assign_ipv6_addresses::builders::AssignIpv6AddressesInputBuilder::default()
}
}
/// A builder for [`AssignIpv6AddressesInput`](crate::operation::assign_ipv6_addresses::AssignIpv6AddressesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssignIpv6AddressesInputBuilder {
pub(crate) ipv6_prefix_count: ::std::option::Option<i32>,
pub(crate) ipv6_prefixes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
pub(crate) ipv6_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) ipv6_address_count: ::std::option::Option<i32>,
}
impl AssignIpv6AddressesInputBuilder {
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn ipv6_prefix_count(mut self, input: i32) -> Self {
self.ipv6_prefix_count = ::std::option::Option::Some(input);
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn set_ipv6_prefix_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.ipv6_prefix_count = input;
self
}
/// <p>The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the <code>Ipv6Prefixes</code> option.</p>
pub fn get_ipv6_prefix_count(&self) -> &::std::option::Option<i32> {
&self.ipv6_prefix_count
}
/// Appends an item to `ipv6_prefixes`.
///
/// To override the contents of this collection use [`set_ipv6_prefixes`](Self::set_ipv6_prefixes).
///
/// <p>One or more IPv6 prefixes assigned to the network interface. You can't use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn ipv6_prefixes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.ipv6_prefixes.unwrap_or_default();
v.push(input.into());
self.ipv6_prefixes = ::std::option::Option::Some(v);
self
}
/// <p>One or more IPv6 prefixes assigned to the network interface. You can't use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn set_ipv6_prefixes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.ipv6_prefixes = input;
self
}
/// <p>One or more IPv6 prefixes assigned to the network interface. You can't use this option if you use the <code>Ipv6PrefixCount</code> option.</p>
pub fn get_ipv6_prefixes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.ipv6_prefixes
}
/// <p>The ID of the network interface.</p>
/// This field is required.
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
}
/// Appends an item to `ipv6_addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>The IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn ipv6_addresses(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.ipv6_addresses.unwrap_or_default();
v.push(input.into());
self.ipv6_addresses = ::std::option::Option::Some(v);
self
}
/// <p>The IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn set_ipv6_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.ipv6_addresses = input;
self
}
/// <p>The IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>
pub fn get_ipv6_addresses(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.ipv6_addresses
}
/// <p>The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</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 additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</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 additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>
pub fn get_ipv6_address_count(&self) -> &::std::option::Option<i32> {
&self.ipv6_address_count
}
/// Consumes the builder and constructs a [`AssignIpv6AddressesInput`](crate::operation::assign_ipv6_addresses::AssignIpv6AddressesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::assign_ipv6_addresses::AssignIpv6AddressesInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::assign_ipv6_addresses::AssignIpv6AddressesInput {
ipv6_prefix_count: self.ipv6_prefix_count,
ipv6_prefixes: self.ipv6_prefixes,
network_interface_id: self.network_interface_id,
ipv6_addresses: self.ipv6_addresses,
ipv6_address_count: self.ipv6_address_count,
})
}
}