aws_sdk_shield/operation/enable_application_layer_automatic_response/
builders.rs1pub use crate::operation::enable_application_layer_automatic_response::_enable_application_layer_automatic_response_output::EnableApplicationLayerAutomaticResponseOutputBuilder;
3
4pub use crate::operation::enable_application_layer_automatic_response::_enable_application_layer_automatic_response_input::EnableApplicationLayerAutomaticResponseInputBuilder;
5
6impl crate::operation::enable_application_layer_automatic_response::builders::EnableApplicationLayerAutomaticResponseInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.enable_application_layer_automatic_response();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
33pub struct EnableApplicationLayerAutomaticResponseFluentBuilder {
34 handle: ::std::sync::Arc<crate::client::Handle>,
35 inner: crate::operation::enable_application_layer_automatic_response::builders::EnableApplicationLayerAutomaticResponseInputBuilder,
36 config_override: ::std::option::Option<crate::config::Builder>,
37}
38impl
39 crate::client::customize::internal::CustomizableSend<
40 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseOutput,
41 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
42 > for EnableApplicationLayerAutomaticResponseFluentBuilder
43{
44 fn send(
45 self,
46 config_override: crate::config::Builder,
47 ) -> crate::client::customize::internal::BoxFuture<
48 crate::client::customize::internal::SendResult<
49 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseOutput,
50 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
51 >,
52 > {
53 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
54 }
55}
56impl EnableApplicationLayerAutomaticResponseFluentBuilder {
57 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
59 Self {
60 handle,
61 inner: ::std::default::Default::default(),
62 config_override: ::std::option::Option::None,
63 }
64 }
65 pub fn as_input(
67 &self,
68 ) -> &crate::operation::enable_application_layer_automatic_response::builders::EnableApplicationLayerAutomaticResponseInputBuilder {
69 &self.inner
70 }
71 pub async fn send(
80 self,
81 ) -> ::std::result::Result<
82 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseOutput,
83 ::aws_smithy_runtime_api::client::result::SdkError<
84 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
85 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86 >,
87 > {
88 let input = self
89 .inner
90 .build()
91 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92 let runtime_plugins =
93 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponse::operation_runtime_plugins(
94 self.handle.runtime_plugins.clone(),
95 &self.handle.conf,
96 self.config_override,
97 );
98 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponse::orchestrate(&runtime_plugins, input)
99 .await
100 }
101
102 pub fn customize(
104 self,
105 ) -> crate::client::customize::CustomizableOperation<
106 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseOutput,
107 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
108 Self,
109 > {
110 crate::client::customize::CustomizableOperation::new(self)
111 }
112 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113 self.set_config_override(::std::option::Option::Some(config_override.into()));
114 self
115 }
116
117 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118 self.config_override = config_override;
119 self
120 }
121 pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.resource_arn(input.into());
124 self
125 }
126 pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.inner = self.inner.set_resource_arn(input);
129 self
130 }
131 pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
133 self.inner.get_resource_arn()
134 }
135 pub fn action(mut self, input: crate::types::ResponseAction) -> Self {
137 self.inner = self.inner.action(input);
138 self
139 }
140 pub fn set_action(mut self, input: ::std::option::Option<crate::types::ResponseAction>) -> Self {
142 self.inner = self.inner.set_action(input);
143 self
144 }
145 pub fn get_action(&self) -> &::std::option::Option<crate::types::ResponseAction> {
147 self.inner.get_action()
148 }
149}