aws_sdk_wafv2/operation/get_web_acl/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_web_acl::_get_web_acl_output::GetWebAclOutputBuilder;
3
4pub use crate::operation::get_web_acl::_get_web_acl_input::GetWebAclInputBuilder;
5
6impl crate::operation::get_web_acl::builders::GetWebAclInputBuilder {
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::get_web_acl::GetWebAclOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_web_acl::GetWebACLError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_web_acl();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetWebACL`.
24///
25/// <p>Retrieves the specified <code>WebACL</code>.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetWebACLFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_web_acl::builders::GetWebAclInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::get_web_acl::GetWebAclOutput,
35        crate::operation::get_web_acl::GetWebACLError,
36    > for GetWebACLFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<crate::operation::get_web_acl::GetWebAclOutput, crate::operation::get_web_acl::GetWebACLError>,
43    > {
44        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45    }
46}
47impl GetWebACLFluentBuilder {
48    /// Creates a new `GetWebACLFluentBuilder`.
49    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50        Self {
51            handle,
52            inner: ::std::default::Default::default(),
53            config_override: ::std::option::Option::None,
54        }
55    }
56    /// Access the GetWebACL as a reference.
57    pub fn as_input(&self) -> &crate::operation::get_web_acl::builders::GetWebAclInputBuilder {
58        &self.inner
59    }
60    /// Sends the request and returns the response.
61    ///
62    /// If an error occurs, an `SdkError` will be returned with additional details that
63    /// can be matched against.
64    ///
65    /// By default, any retryable failures will be retried twice. Retry behavior
66    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67    /// set when configuring the client.
68    pub async fn send(
69        self,
70    ) -> ::std::result::Result<
71        crate::operation::get_web_acl::GetWebAclOutput,
72        ::aws_smithy_runtime_api::client::result::SdkError<
73            crate::operation::get_web_acl::GetWebACLError,
74            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
75        >,
76    > {
77        let input = self
78            .inner
79            .build()
80            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
81        let runtime_plugins = crate::operation::get_web_acl::GetWebACL::operation_runtime_plugins(
82            self.handle.runtime_plugins.clone(),
83            &self.handle.conf,
84            self.config_override,
85        );
86        crate::operation::get_web_acl::GetWebACL::orchestrate(&runtime_plugins, input).await
87    }
88
89    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
90    pub fn customize(
91        self,
92    ) -> crate::client::customize::CustomizableOperation<
93        crate::operation::get_web_acl::GetWebAclOutput,
94        crate::operation::get_web_acl::GetWebACLError,
95        Self,
96    > {
97        crate::client::customize::CustomizableOperation::new(self)
98    }
99    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
100        self.set_config_override(::std::option::Option::Some(config_override.into()));
101        self
102    }
103
104    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
105        self.config_override = config_override;
106        self
107    }
108    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
109    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.inner = self.inner.name(input.into());
111        self
112    }
113    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
114    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.inner = self.inner.set_name(input);
116        self
117    }
118    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
119    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
120        self.inner.get_name()
121    }
122    /// <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>
123    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
124    /// <ul>
125    /// <li>
126    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
127    /// <li>
128    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
129    /// </ul>
130    pub fn scope(mut self, input: crate::types::Scope) -> Self {
131        self.inner = self.inner.scope(input);
132        self
133    }
134    /// <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>
135    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
136    /// <ul>
137    /// <li>
138    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
139    /// <li>
140    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
141    /// </ul>
142    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
143        self.inner = self.inner.set_scope(input);
144        self
145    }
146    /// <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>
147    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
148    /// <ul>
149    /// <li>
150    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
151    /// <li>
152    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
153    /// </ul>
154    pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
155        self.inner.get_scope()
156    }
157    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
158    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.id(input.into());
160        self
161    }
162    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
163    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_id(input);
165        self
166    }
167    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
168    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_id()
170    }
171    /// <p>The Amazon Resource Name (ARN) of the web ACL that you want to retrieve.</p>
172    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.inner = self.inner.arn(input.into());
174        self
175    }
176    /// <p>The Amazon Resource Name (ARN) of the web ACL that you want to retrieve.</p>
177    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.inner = self.inner.set_arn(input);
179        self
180    }
181    /// <p>The Amazon Resource Name (ARN) of the web ACL that you want to retrieve.</p>
182    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
183        self.inner.get_arn()
184    }
185}