aws_sdk_ec2/operation/create_vpc_endpoint_service_configuration/_create_vpc_endpoint_service_configuration_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateVpcEndpointServiceConfigurationInput {
6 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
7 pub dry_run: ::std::option::Option<bool>,
8 /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
9 pub acceptance_required: ::std::option::Option<bool>,
10 /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
11 pub private_dns_name: ::std::option::Option<::std::string::String>,
12 /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
13 pub network_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
15 pub gateway_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16 /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
17 pub supported_ip_address_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18 /// <p>The Regions from which service consumers can access the service.</p>
19 pub supported_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20 /// <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/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
21 pub client_token: ::std::option::Option<::std::string::String>,
22 /// <p>The tags to associate with the service.</p>
23 pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
24}
25impl CreateVpcEndpointServiceConfigurationInput {
26 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
27 pub fn dry_run(&self) -> ::std::option::Option<bool> {
28 self.dry_run
29 }
30 /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
31 pub fn acceptance_required(&self) -> ::std::option::Option<bool> {
32 self.acceptance_required
33 }
34 /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
35 pub fn private_dns_name(&self) -> ::std::option::Option<&str> {
36 self.private_dns_name.as_deref()
37 }
38 /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
39 ///
40 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.network_load_balancer_arns.is_none()`.
41 pub fn network_load_balancer_arns(&self) -> &[::std::string::String] {
42 self.network_load_balancer_arns.as_deref().unwrap_or_default()
43 }
44 /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
45 ///
46 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.gateway_load_balancer_arns.is_none()`.
47 pub fn gateway_load_balancer_arns(&self) -> &[::std::string::String] {
48 self.gateway_load_balancer_arns.as_deref().unwrap_or_default()
49 }
50 /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
51 ///
52 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_ip_address_types.is_none()`.
53 pub fn supported_ip_address_types(&self) -> &[::std::string::String] {
54 self.supported_ip_address_types.as_deref().unwrap_or_default()
55 }
56 /// <p>The Regions from which service consumers can access the service.</p>
57 ///
58 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_regions.is_none()`.
59 pub fn supported_regions(&self) -> &[::std::string::String] {
60 self.supported_regions.as_deref().unwrap_or_default()
61 }
62 /// <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/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
63 pub fn client_token(&self) -> ::std::option::Option<&str> {
64 self.client_token.as_deref()
65 }
66 /// <p>The tags to associate with the service.</p>
67 ///
68 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_specifications.is_none()`.
69 pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
70 self.tag_specifications.as_deref().unwrap_or_default()
71 }
72}
73impl CreateVpcEndpointServiceConfigurationInput {
74 /// Creates a new builder-style object to manufacture [`CreateVpcEndpointServiceConfigurationInput`](crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationInput).
75 pub fn builder() -> crate::operation::create_vpc_endpoint_service_configuration::builders::CreateVpcEndpointServiceConfigurationInputBuilder {
76 crate::operation::create_vpc_endpoint_service_configuration::builders::CreateVpcEndpointServiceConfigurationInputBuilder::default()
77 }
78}
79
80/// A builder for [`CreateVpcEndpointServiceConfigurationInput`](crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct CreateVpcEndpointServiceConfigurationInputBuilder {
84 pub(crate) dry_run: ::std::option::Option<bool>,
85 pub(crate) acceptance_required: ::std::option::Option<bool>,
86 pub(crate) private_dns_name: ::std::option::Option<::std::string::String>,
87 pub(crate) network_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
88 pub(crate) gateway_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
89 pub(crate) supported_ip_address_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
90 pub(crate) supported_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
91 pub(crate) client_token: ::std::option::Option<::std::string::String>,
92 pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
93}
94impl CreateVpcEndpointServiceConfigurationInputBuilder {
95 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
96 pub fn dry_run(mut self, input: bool) -> Self {
97 self.dry_run = ::std::option::Option::Some(input);
98 self
99 }
100 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
101 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
102 self.dry_run = input;
103 self
104 }
105 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
106 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
107 &self.dry_run
108 }
109 /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
110 pub fn acceptance_required(mut self, input: bool) -> Self {
111 self.acceptance_required = ::std::option::Option::Some(input);
112 self
113 }
114 /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
115 pub fn set_acceptance_required(mut self, input: ::std::option::Option<bool>) -> Self {
116 self.acceptance_required = input;
117 self
118 }
119 /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
120 pub fn get_acceptance_required(&self) -> &::std::option::Option<bool> {
121 &self.acceptance_required
122 }
123 /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
124 pub fn private_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.private_dns_name = ::std::option::Option::Some(input.into());
126 self
127 }
128 /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
129 pub fn set_private_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.private_dns_name = input;
131 self
132 }
133 /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
134 pub fn get_private_dns_name(&self) -> &::std::option::Option<::std::string::String> {
135 &self.private_dns_name
136 }
137 /// Appends an item to `network_load_balancer_arns`.
138 ///
139 /// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
140 ///
141 /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
142 pub fn network_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 let mut v = self.network_load_balancer_arns.unwrap_or_default();
144 v.push(input.into());
145 self.network_load_balancer_arns = ::std::option::Option::Some(v);
146 self
147 }
148 /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
149 pub fn set_network_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
150 self.network_load_balancer_arns = input;
151 self
152 }
153 /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
154 pub fn get_network_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
155 &self.network_load_balancer_arns
156 }
157 /// Appends an item to `gateway_load_balancer_arns`.
158 ///
159 /// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
160 ///
161 /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
162 pub fn gateway_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 let mut v = self.gateway_load_balancer_arns.unwrap_or_default();
164 v.push(input.into());
165 self.gateway_load_balancer_arns = ::std::option::Option::Some(v);
166 self
167 }
168 /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
169 pub fn set_gateway_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
170 self.gateway_load_balancer_arns = input;
171 self
172 }
173 /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
174 pub fn get_gateway_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
175 &self.gateway_load_balancer_arns
176 }
177 /// Appends an item to `supported_ip_address_types`.
178 ///
179 /// To override the contents of this collection use [`set_supported_ip_address_types`](Self::set_supported_ip_address_types).
180 ///
181 /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
182 pub fn supported_ip_address_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 let mut v = self.supported_ip_address_types.unwrap_or_default();
184 v.push(input.into());
185 self.supported_ip_address_types = ::std::option::Option::Some(v);
186 self
187 }
188 /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
189 pub fn set_supported_ip_address_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
190 self.supported_ip_address_types = input;
191 self
192 }
193 /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
194 pub fn get_supported_ip_address_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
195 &self.supported_ip_address_types
196 }
197 /// Appends an item to `supported_regions`.
198 ///
199 /// To override the contents of this collection use [`set_supported_regions`](Self::set_supported_regions).
200 ///
201 /// <p>The Regions from which service consumers can access the service.</p>
202 pub fn supported_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203 let mut v = self.supported_regions.unwrap_or_default();
204 v.push(input.into());
205 self.supported_regions = ::std::option::Option::Some(v);
206 self
207 }
208 /// <p>The Regions from which service consumers can access the service.</p>
209 pub fn set_supported_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
210 self.supported_regions = input;
211 self
212 }
213 /// <p>The Regions from which service consumers can access the service.</p>
214 pub fn get_supported_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
215 &self.supported_regions
216 }
217 /// <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/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
218 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219 self.client_token = ::std::option::Option::Some(input.into());
220 self
221 }
222 /// <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/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
223 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224 self.client_token = input;
225 self
226 }
227 /// <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/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
228 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
229 &self.client_token
230 }
231 /// Appends an item to `tag_specifications`.
232 ///
233 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
234 ///
235 /// <p>The tags to associate with the service.</p>
236 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
237 let mut v = self.tag_specifications.unwrap_or_default();
238 v.push(input);
239 self.tag_specifications = ::std::option::Option::Some(v);
240 self
241 }
242 /// <p>The tags to associate with the service.</p>
243 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
244 self.tag_specifications = input;
245 self
246 }
247 /// <p>The tags to associate with the service.</p>
248 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
249 &self.tag_specifications
250 }
251 /// Consumes the builder and constructs a [`CreateVpcEndpointServiceConfigurationInput`](crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationInput).
252 pub fn build(
253 self,
254 ) -> ::std::result::Result<
255 crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationInput,
256 ::aws_smithy_types::error::operation::BuildError,
257 > {
258 ::std::result::Result::Ok(
259 crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationInput {
260 dry_run: self.dry_run,
261 acceptance_required: self.acceptance_required,
262 private_dns_name: self.private_dns_name,
263 network_load_balancer_arns: self.network_load_balancer_arns,
264 gateway_load_balancer_arns: self.gateway_load_balancer_arns,
265 supported_ip_address_types: self.supported_ip_address_types,
266 supported_regions: self.supported_regions,
267 client_token: self.client_token,
268 tag_specifications: self.tag_specifications,
269 },
270 )
271 }
272}