aws_sdk_ec2/operation/describe_vpc_endpoint_service_configurations/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_vpc_endpoint_service_configurations::_describe_vpc_endpoint_service_configurations_output::DescribeVpcEndpointServiceConfigurationsOutputBuilder;
3
4pub use crate::operation::describe_vpc_endpoint_service_configurations::_describe_vpc_endpoint_service_configurations_input::DescribeVpcEndpointServiceConfigurationsInputBuilder;
5
6impl crate::operation::describe_vpc_endpoint_service_configurations::builders::DescribeVpcEndpointServiceConfigurationsInputBuilder {
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::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_vpc_endpoint_service_configurations();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeVpcEndpointServiceConfigurations`.
24///
25/// <p>Describes the VPC endpoint service configurations in your account (your services).</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeVpcEndpointServiceConfigurationsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_vpc_endpoint_service_configurations::builders::DescribeVpcEndpointServiceConfigurationsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsOutput,
35        crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsError,
36    > for DescribeVpcEndpointServiceConfigurationsFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsOutput,
44            crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeVpcEndpointServiceConfigurationsFluentBuilder {
51    /// Creates a new `DescribeVpcEndpointServiceConfigurationsFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the DescribeVpcEndpointServiceConfigurations as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::describe_vpc_endpoint_service_configurations::builders::DescribeVpcEndpointServiceConfigurationsInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins =
87            crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurations::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurations::orchestrate(&runtime_plugins, input)
93            .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::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsOutput,
101        crate::operation::describe_vpc_endpoint_service_configurations::DescribeVpcEndpointServiceConfigurationsError,
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    /// Create a paginator for this request
116    ///
117    /// Paginators are used by calling [`send().await`](crate::operation::describe_vpc_endpoint_service_configurations::paginator::DescribeVpcEndpointServiceConfigurationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
118    pub fn into_paginator(
119        self,
120    ) -> crate::operation::describe_vpc_endpoint_service_configurations::paginator::DescribeVpcEndpointServiceConfigurationsPaginator {
121        crate::operation::describe_vpc_endpoint_service_configurations::paginator::DescribeVpcEndpointServiceConfigurationsPaginator::new(
122            self.handle,
123            self.inner,
124        )
125    }
126    /// <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>
127    pub fn dry_run(mut self, input: bool) -> Self {
128        self.inner = self.inner.dry_run(input);
129        self
130    }
131    /// <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>
132    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
133        self.inner = self.inner.set_dry_run(input);
134        self
135    }
136    /// <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>
137    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
138        self.inner.get_dry_run()
139    }
140    ///
141    /// Appends an item to `ServiceIds`.
142    ///
143    /// To override the contents of this collection use [`set_service_ids`](Self::set_service_ids).
144    ///
145    /// <p>The IDs of the endpoint services.</p>
146    pub fn service_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.service_ids(input.into());
148        self
149    }
150    /// <p>The IDs of the endpoint services.</p>
151    pub fn set_service_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
152        self.inner = self.inner.set_service_ids(input);
153        self
154    }
155    /// <p>The IDs of the endpoint services.</p>
156    pub fn get_service_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
157        self.inner.get_service_ids()
158    }
159    ///
160    /// Appends an item to `Filters`.
161    ///
162    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
163    ///
164    /// <p>The filters.</p>
165    /// <ul>
166    /// <li>
167    /// <p><code>service-name</code> - The name of the service.</p></li>
168    /// <li>
169    /// <p><code>service-id</code> - The ID of the service.</p></li>
170    /// <li>
171    /// <p><code>service-state</code> - The state of the service (<code>Pending</code> | <code>Available</code> | <code>Deleting</code> | <code>Deleted</code> | <code>Failed</code>).</p></li>
172    /// <li>
173    /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
174    /// <li>
175    /// <p><code>tag</code>:<key>
176    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
177    /// <code>Owner</code> and the value
178    /// <code>TeamA</code>, specify
179    /// <code>tag:Owner</code> for the filter name and
180    /// <code>TeamA</code> for the filter value.
181    /// </key></p></li>
182    /// <li>
183    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
184    /// </ul>
185    pub fn filters(mut self, input: crate::types::Filter) -> Self {
186        self.inner = self.inner.filters(input);
187        self
188    }
189    /// <p>The filters.</p>
190    /// <ul>
191    /// <li>
192    /// <p><code>service-name</code> - The name of the service.</p></li>
193    /// <li>
194    /// <p><code>service-id</code> - The ID of the service.</p></li>
195    /// <li>
196    /// <p><code>service-state</code> - The state of the service (<code>Pending</code> | <code>Available</code> | <code>Deleting</code> | <code>Deleted</code> | <code>Failed</code>).</p></li>
197    /// <li>
198    /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
199    /// <li>
200    /// <p><code>tag</code>:<key>
201    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
202    /// <code>Owner</code> and the value
203    /// <code>TeamA</code>, specify
204    /// <code>tag:Owner</code> for the filter name and
205    /// <code>TeamA</code> for the filter value.
206    /// </key></p></li>
207    /// <li>
208    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
209    /// </ul>
210    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
211        self.inner = self.inner.set_filters(input);
212        self
213    }
214    /// <p>The filters.</p>
215    /// <ul>
216    /// <li>
217    /// <p><code>service-name</code> - The name of the service.</p></li>
218    /// <li>
219    /// <p><code>service-id</code> - The ID of the service.</p></li>
220    /// <li>
221    /// <p><code>service-state</code> - The state of the service (<code>Pending</code> | <code>Available</code> | <code>Deleting</code> | <code>Deleted</code> | <code>Failed</code>).</p></li>
222    /// <li>
223    /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
224    /// <li>
225    /// <p><code>tag</code>:<key>
226    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
227    /// <code>Owner</code> and the value
228    /// <code>TeamA</code>, specify
229    /// <code>tag:Owner</code> for the filter name and
230    /// <code>TeamA</code> for the filter value.
231    /// </key></p></li>
232    /// <li>
233    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
234    /// </ul>
235    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
236        self.inner.get_filters()
237    }
238    /// <p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.</p>
239    pub fn max_results(mut self, input: i32) -> Self {
240        self.inner = self.inner.max_results(input);
241        self
242    }
243    /// <p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.</p>
244    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
245        self.inner = self.inner.set_max_results(input);
246        self
247    }
248    /// <p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.</p>
249    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
250        self.inner.get_max_results()
251    }
252    /// <p>The token to retrieve the next page of results.</p>
253    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        self.inner = self.inner.next_token(input.into());
255        self
256    }
257    /// <p>The token to retrieve the next page of results.</p>
258    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.inner = self.inner.set_next_token(input);
260        self
261    }
262    /// <p>The token to retrieve the next page of results.</p>
263    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
264        self.inner.get_next_token()
265    }
266}