aws_sdk_wafv2/operation/list_regex_pattern_sets/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_regex_pattern_sets::_list_regex_pattern_sets_output::ListRegexPatternSetsOutputBuilder;
3
4pub use crate::operation::list_regex_pattern_sets::_list_regex_pattern_sets_input::ListRegexPatternSetsInputBuilder;
5
6impl crate::operation::list_regex_pattern_sets::builders::ListRegexPatternSetsInputBuilder {
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::list_regex_pattern_sets::ListRegexPatternSetsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_regex_pattern_sets::ListRegexPatternSetsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_regex_pattern_sets();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListRegexPatternSets`.
24///
25/// <p>Retrieves an array of <code>RegexPatternSetSummary</code> objects for the regex pattern sets that you manage.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListRegexPatternSetsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::list_regex_pattern_sets::builders::ListRegexPatternSetsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::list_regex_pattern_sets::ListRegexPatternSetsOutput,
35        crate::operation::list_regex_pattern_sets::ListRegexPatternSetsError,
36    > for ListRegexPatternSetsFluentBuilder
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::list_regex_pattern_sets::ListRegexPatternSetsOutput,
44            crate::operation::list_regex_pattern_sets::ListRegexPatternSetsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ListRegexPatternSetsFluentBuilder {
51    /// Creates a new `ListRegexPatternSetsFluentBuilder`.
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 ListRegexPatternSets as a reference.
60    pub fn as_input(&self) -> &crate::operation::list_regex_pattern_sets::builders::ListRegexPatternSetsInputBuilder {
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::list_regex_pattern_sets::ListRegexPatternSetsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::list_regex_pattern_sets::ListRegexPatternSetsError,
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 = crate::operation::list_regex_pattern_sets::ListRegexPatternSets::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::list_regex_pattern_sets::ListRegexPatternSets::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::list_regex_pattern_sets::ListRegexPatternSetsOutput,
97        crate::operation::list_regex_pattern_sets::ListRegexPatternSetsError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
112    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
113    /// <ul>
114    /// <li>
115    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
116    /// <li>
117    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
118    /// </ul>
119    pub fn scope(mut self, input: crate::types::Scope) -> Self {
120        self.inner = self.inner.scope(input);
121        self
122    }
123    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
124    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
125    /// <ul>
126    /// <li>
127    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
128    /// <li>
129    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
130    /// </ul>
131    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
132        self.inner = self.inner.set_scope(input);
133        self
134    }
135    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
136    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
137    /// <ul>
138    /// <li>
139    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
140    /// <li>
141    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
142    /// </ul>
143    pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
144        self.inner.get_scope()
145    }
146    /// <p>When you request a list of objects with a <code>Limit</code> setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a <code>NextMarker</code> value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.</p>
147    pub fn next_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.inner = self.inner.next_marker(input.into());
149        self
150    }
151    /// <p>When you request a list of objects with a <code>Limit</code> setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a <code>NextMarker</code> value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.</p>
152    pub fn set_next_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.inner = self.inner.set_next_marker(input);
154        self
155    }
156    /// <p>When you request a list of objects with a <code>Limit</code> setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a <code>NextMarker</code> value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.</p>
157    pub fn get_next_marker(&self) -> &::std::option::Option<::std::string::String> {
158        self.inner.get_next_marker()
159    }
160    /// <p>The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a <code>NextMarker</code> value that you can use in a subsequent call to get the next batch of objects.</p>
161    pub fn limit(mut self, input: i32) -> Self {
162        self.inner = self.inner.limit(input);
163        self
164    }
165    /// <p>The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a <code>NextMarker</code> value that you can use in a subsequent call to get the next batch of objects.</p>
166    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
167        self.inner = self.inner.set_limit(input);
168        self
169    }
170    /// <p>The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a <code>NextMarker</code> value that you can use in a subsequent call to get the next batch of objects.</p>
171    pub fn get_limit(&self) -> &::std::option::Option<i32> {
172        self.inner.get_limit()
173    }
174}