aws_sdk_ec2/operation/describe_network_insights_access_scopes/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_network_insights_access_scopes::_describe_network_insights_access_scopes_output::DescribeNetworkInsightsAccessScopesOutputBuilder;
3
4pub use crate::operation::describe_network_insights_access_scopes::_describe_network_insights_access_scopes_input::DescribeNetworkInsightsAccessScopesInputBuilder;
5
6impl crate::operation::describe_network_insights_access_scopes::builders::DescribeNetworkInsightsAccessScopesInputBuilder {
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_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_network_insights_access_scopes();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeNetworkInsightsAccessScopes`.
24///
25/// <p>Describes the specified Network Access Scopes.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeNetworkInsightsAccessScopesFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_network_insights_access_scopes::builders::DescribeNetworkInsightsAccessScopesInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesOutput,
35        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesError,
36    > for DescribeNetworkInsightsAccessScopesFluentBuilder
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_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesOutput,
44            crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeNetworkInsightsAccessScopesFluentBuilder {
51    /// Creates a new `DescribeNetworkInsightsAccessScopesFluentBuilder`.
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 DescribeNetworkInsightsAccessScopes as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_network_insights_access_scopes::builders::DescribeNetworkInsightsAccessScopesInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins =
85            crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopes::operation_runtime_plugins(
86                self.handle.runtime_plugins.clone(),
87                &self.handle.conf,
88                self.config_override,
89            );
90        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopes::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesOutput,
98        crate::operation::describe_network_insights_access_scopes::DescribeNetworkInsightsAccessScopesError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// Create a paginator for this request
113    ///
114    /// Paginators are used by calling [`send().await`](crate::operation::describe_network_insights_access_scopes::paginator::DescribeNetworkInsightsAccessScopesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115    pub fn into_paginator(
116        self,
117    ) -> crate::operation::describe_network_insights_access_scopes::paginator::DescribeNetworkInsightsAccessScopesPaginator {
118        crate::operation::describe_network_insights_access_scopes::paginator::DescribeNetworkInsightsAccessScopesPaginator::new(
119            self.handle,
120            self.inner,
121        )
122    }
123    ///
124    /// Appends an item to `NetworkInsightsAccessScopeIds`.
125    ///
126    /// To override the contents of this collection use [`set_network_insights_access_scope_ids`](Self::set_network_insights_access_scope_ids).
127    ///
128    /// <p>The IDs of the Network Access Scopes.</p>
129    pub fn network_insights_access_scope_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.network_insights_access_scope_ids(input.into());
131        self
132    }
133    /// <p>The IDs of the Network Access Scopes.</p>
134    pub fn set_network_insights_access_scope_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
135        self.inner = self.inner.set_network_insights_access_scope_ids(input);
136        self
137    }
138    /// <p>The IDs of the Network Access Scopes.</p>
139    pub fn get_network_insights_access_scope_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
140        self.inner.get_network_insights_access_scope_ids()
141    }
142    ///
143    /// Appends an item to `Filters`.
144    ///
145    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
146    ///
147    /// <p>There are no supported filters.</p>
148    pub fn filters(mut self, input: crate::types::Filter) -> Self {
149        self.inner = self.inner.filters(input);
150        self
151    }
152    /// <p>There are no supported filters.</p>
153    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
154        self.inner = self.inner.set_filters(input);
155        self
156    }
157    /// <p>There are no supported filters.</p>
158    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
159        self.inner.get_filters()
160    }
161    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
162    pub fn max_results(mut self, input: i32) -> Self {
163        self.inner = self.inner.max_results(input);
164        self
165    }
166    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
167    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
168        self.inner = self.inner.set_max_results(input);
169        self
170    }
171    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
172    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
173        self.inner.get_max_results()
174    }
175    /// <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>
176    pub fn dry_run(mut self, input: bool) -> Self {
177        self.inner = self.inner.dry_run(input);
178        self
179    }
180    /// <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>
181    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
182        self.inner = self.inner.set_dry_run(input);
183        self
184    }
185    /// <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>
186    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
187        self.inner.get_dry_run()
188    }
189    /// <p>The token for the next page of results.</p>
190    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.inner = self.inner.next_token(input.into());
192        self
193    }
194    /// <p>The token for the next page of results.</p>
195    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.inner = self.inner.set_next_token(input);
197        self
198    }
199    /// <p>The token for the next page of results.</p>
200    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
201        self.inner.get_next_token()
202    }
203}