aws_sdk_ec2/operation/modify_vpc_endpoint_service_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_vpc_endpoint_service_configuration::_modify_vpc_endpoint_service_configuration_output::ModifyVpcEndpointServiceConfigurationOutputBuilder;
3
4pub use crate::operation::modify_vpc_endpoint_service_configuration::_modify_vpc_endpoint_service_configuration_input::ModifyVpcEndpointServiceConfigurationInputBuilder;
5
6impl crate::operation::modify_vpc_endpoint_service_configuration::builders::ModifyVpcEndpointServiceConfigurationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.modify_vpc_endpoint_service_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ModifyVpcEndpointServiceConfiguration`.
24///
25/// <p>Modifies the attributes of the specified VPC endpoint service configuration.</p>
26/// <p>If you set or modify the private DNS name, you must prove that you own the private DNS domain name.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct ModifyVpcEndpointServiceConfigurationFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::modify_vpc_endpoint_service_configuration::builders::ModifyVpcEndpointServiceConfigurationInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationOutput,
36        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationError,
37    > for ModifyVpcEndpointServiceConfigurationFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationOutput,
45            crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl ModifyVpcEndpointServiceConfigurationFluentBuilder {
52    /// Creates a new `ModifyVpcEndpointServiceConfigurationFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the ModifyVpcEndpointServiceConfiguration as a reference.
61    pub fn as_input(
62        &self,
63    ) -> &crate::operation::modify_vpc_endpoint_service_configuration::builders::ModifyVpcEndpointServiceConfigurationInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins =
88            crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfiguration::operation_runtime_plugins(
89                self.handle.runtime_plugins.clone(),
90                &self.handle.conf,
91                self.config_override,
92            );
93        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfiguration::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationOutput,
101        crate::operation::modify_vpc_endpoint_service_configuration::ModifyVpcEndpointServiceConfigurationError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <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>
116    pub fn dry_run(mut self, input: bool) -> Self {
117        self.inner = self.inner.dry_run(input);
118        self
119    }
120    /// <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>
121    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
122        self.inner = self.inner.set_dry_run(input);
123        self
124    }
125    /// <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>
126    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
127        self.inner.get_dry_run()
128    }
129    /// <p>The ID of the service.</p>
130    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.service_id(input.into());
132        self
133    }
134    /// <p>The ID of the service.</p>
135    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_service_id(input);
137        self
138    }
139    /// <p>The ID of the service.</p>
140    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_service_id()
142    }
143    /// <p>(Interface endpoint configuration) The private DNS name to assign to the endpoint service.</p>
144    pub fn private_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.private_dns_name(input.into());
146        self
147    }
148    /// <p>(Interface endpoint configuration) The private DNS name to assign to the endpoint service.</p>
149    pub fn set_private_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_private_dns_name(input);
151        self
152    }
153    /// <p>(Interface endpoint configuration) The private DNS name to assign to the endpoint service.</p>
154    pub fn get_private_dns_name(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_private_dns_name()
156    }
157    /// <p>(Interface endpoint configuration) Removes the private DNS name of the endpoint service.</p>
158    pub fn remove_private_dns_name(mut self, input: bool) -> Self {
159        self.inner = self.inner.remove_private_dns_name(input);
160        self
161    }
162    /// <p>(Interface endpoint configuration) Removes the private DNS name of the endpoint service.</p>
163    pub fn set_remove_private_dns_name(mut self, input: ::std::option::Option<bool>) -> Self {
164        self.inner = self.inner.set_remove_private_dns_name(input);
165        self
166    }
167    /// <p>(Interface endpoint configuration) Removes the private DNS name of the endpoint service.</p>
168    pub fn get_remove_private_dns_name(&self) -> &::std::option::Option<bool> {
169        self.inner.get_remove_private_dns_name()
170    }
171    /// <p>Indicates whether requests to create an endpoint to the service must be accepted.</p>
172    pub fn acceptance_required(mut self, input: bool) -> Self {
173        self.inner = self.inner.acceptance_required(input);
174        self
175    }
176    /// <p>Indicates whether requests to create an endpoint to the service must be accepted.</p>
177    pub fn set_acceptance_required(mut self, input: ::std::option::Option<bool>) -> Self {
178        self.inner = self.inner.set_acceptance_required(input);
179        self
180    }
181    /// <p>Indicates whether requests to create an endpoint to the service must be accepted.</p>
182    pub fn get_acceptance_required(&self) -> &::std::option::Option<bool> {
183        self.inner.get_acceptance_required()
184    }
185    ///
186    /// Appends an item to `AddNetworkLoadBalancerArns`.
187    ///
188    /// To override the contents of this collection use [`set_add_network_load_balancer_arns`](Self::set_add_network_load_balancer_arns).
189    ///
190    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to add to the service configuration.</p>
191    pub fn add_network_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.inner = self.inner.add_network_load_balancer_arns(input.into());
193        self
194    }
195    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to add to the service configuration.</p>
196    pub fn set_add_network_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
197        self.inner = self.inner.set_add_network_load_balancer_arns(input);
198        self
199    }
200    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to add to the service configuration.</p>
201    pub fn get_add_network_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
202        self.inner.get_add_network_load_balancer_arns()
203    }
204    ///
205    /// Appends an item to `RemoveNetworkLoadBalancerArns`.
206    ///
207    /// To override the contents of this collection use [`set_remove_network_load_balancer_arns`](Self::set_remove_network_load_balancer_arns).
208    ///
209    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to remove from the service configuration.</p>
210    pub fn remove_network_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.inner = self.inner.remove_network_load_balancer_arns(input.into());
212        self
213    }
214    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to remove from the service configuration.</p>
215    pub fn set_remove_network_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
216        self.inner = self.inner.set_remove_network_load_balancer_arns(input);
217        self
218    }
219    /// <p>The Amazon Resource Names (ARNs) of Network Load Balancers to remove from the service configuration.</p>
220    pub fn get_remove_network_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
221        self.inner.get_remove_network_load_balancer_arns()
222    }
223    ///
224    /// Appends an item to `AddGatewayLoadBalancerArns`.
225    ///
226    /// To override the contents of this collection use [`set_add_gateway_load_balancer_arns`](Self::set_add_gateway_load_balancer_arns).
227    ///
228    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to the service configuration.</p>
229    pub fn add_gateway_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230        self.inner = self.inner.add_gateway_load_balancer_arns(input.into());
231        self
232    }
233    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to the service configuration.</p>
234    pub fn set_add_gateway_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
235        self.inner = self.inner.set_add_gateway_load_balancer_arns(input);
236        self
237    }
238    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to the service configuration.</p>
239    pub fn get_add_gateway_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
240        self.inner.get_add_gateway_load_balancer_arns()
241    }
242    ///
243    /// Appends an item to `RemoveGatewayLoadBalancerArns`.
244    ///
245    /// To override the contents of this collection use [`set_remove_gateway_load_balancer_arns`](Self::set_remove_gateway_load_balancer_arns).
246    ///
247    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from the service configuration.</p>
248    pub fn remove_gateway_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249        self.inner = self.inner.remove_gateway_load_balancer_arns(input.into());
250        self
251    }
252    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from the service configuration.</p>
253    pub fn set_remove_gateway_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
254        self.inner = self.inner.set_remove_gateway_load_balancer_arns(input);
255        self
256    }
257    /// <p>The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from the service configuration.</p>
258    pub fn get_remove_gateway_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
259        self.inner.get_remove_gateway_load_balancer_arns()
260    }
261    ///
262    /// Appends an item to `AddSupportedIpAddressTypes`.
263    ///
264    /// To override the contents of this collection use [`set_add_supported_ip_address_types`](Self::set_add_supported_ip_address_types).
265    ///
266    /// <p>The IP address types to add to the service configuration.</p>
267    pub fn add_supported_ip_address_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268        self.inner = self.inner.add_supported_ip_address_types(input.into());
269        self
270    }
271    /// <p>The IP address types to add to the service configuration.</p>
272    pub fn set_add_supported_ip_address_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
273        self.inner = self.inner.set_add_supported_ip_address_types(input);
274        self
275    }
276    /// <p>The IP address types to add to the service configuration.</p>
277    pub fn get_add_supported_ip_address_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
278        self.inner.get_add_supported_ip_address_types()
279    }
280    ///
281    /// Appends an item to `RemoveSupportedIpAddressTypes`.
282    ///
283    /// To override the contents of this collection use [`set_remove_supported_ip_address_types`](Self::set_remove_supported_ip_address_types).
284    ///
285    /// <p>The IP address types to remove from the service configuration.</p>
286    pub fn remove_supported_ip_address_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287        self.inner = self.inner.remove_supported_ip_address_types(input.into());
288        self
289    }
290    /// <p>The IP address types to remove from the service configuration.</p>
291    pub fn set_remove_supported_ip_address_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
292        self.inner = self.inner.set_remove_supported_ip_address_types(input);
293        self
294    }
295    /// <p>The IP address types to remove from the service configuration.</p>
296    pub fn get_remove_supported_ip_address_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
297        self.inner.get_remove_supported_ip_address_types()
298    }
299    ///
300    /// Appends an item to `AddSupportedRegions`.
301    ///
302    /// To override the contents of this collection use [`set_add_supported_regions`](Self::set_add_supported_regions).
303    ///
304    /// <p>The supported Regions to add to the service configuration.</p>
305    pub fn add_supported_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.inner = self.inner.add_supported_regions(input.into());
307        self
308    }
309    /// <p>The supported Regions to add to the service configuration.</p>
310    pub fn set_add_supported_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
311        self.inner = self.inner.set_add_supported_regions(input);
312        self
313    }
314    /// <p>The supported Regions to add to the service configuration.</p>
315    pub fn get_add_supported_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
316        self.inner.get_add_supported_regions()
317    }
318    ///
319    /// Appends an item to `RemoveSupportedRegions`.
320    ///
321    /// To override the contents of this collection use [`set_remove_supported_regions`](Self::set_remove_supported_regions).
322    ///
323    /// <p>The supported Regions to remove from the service configuration.</p>
324    pub fn remove_supported_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
325        self.inner = self.inner.remove_supported_regions(input.into());
326        self
327    }
328    /// <p>The supported Regions to remove from the service configuration.</p>
329    pub fn set_remove_supported_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
330        self.inner = self.inner.set_remove_supported_regions(input);
331        self
332    }
333    /// <p>The supported Regions to remove from the service configuration.</p>
334    pub fn get_remove_supported_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
335        self.inner.get_remove_supported_regions()
336    }
337}