aws_sdk_inspector2/operation/enable/
builders.rs1pub use crate::operation::enable::_enable_output::EnableOutputBuilder;
3
4pub use crate::operation::enable::_enable_input::EnableInputBuilder;
5
6impl crate::operation::enable::builders::EnableInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::enable::EnableOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::enable::EnableError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.enable();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct EnableFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::enable::builders::EnableInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::enable::EnableOutput, crate::operation::enable::EnableError>
33 for EnableFluentBuilder
34{
35 fn send(
36 self,
37 config_override: crate::config::Builder,
38 ) -> crate::client::customize::internal::BoxFuture<
39 crate::client::customize::internal::SendResult<crate::operation::enable::EnableOutput, crate::operation::enable::EnableError>,
40 > {
41 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42 }
43}
44impl EnableFluentBuilder {
45 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47 Self {
48 handle,
49 inner: ::std::default::Default::default(),
50 config_override: ::std::option::Option::None,
51 }
52 }
53 pub fn as_input(&self) -> &crate::operation::enable::builders::EnableInputBuilder {
55 &self.inner
56 }
57 pub async fn send(
66 self,
67 ) -> ::std::result::Result<
68 crate::operation::enable::EnableOutput,
69 ::aws_smithy_runtime_api::client::result::SdkError<
70 crate::operation::enable::EnableError,
71 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72 >,
73 > {
74 let input = self
75 .inner
76 .build()
77 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78 let runtime_plugins =
79 crate::operation::enable::Enable::operation_runtime_plugins(self.handle.runtime_plugins.clone(), &self.handle.conf, self.config_override);
80 crate::operation::enable::Enable::orchestrate(&runtime_plugins, input).await
81 }
82
83 pub fn customize(
85 self,
86 ) -> crate::client::customize::CustomizableOperation<crate::operation::enable::EnableOutput, crate::operation::enable::EnableError, Self> {
87 crate::client::customize::CustomizableOperation::new(self)
88 }
89 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
90 self.set_config_override(::std::option::Option::Some(config_override.into()));
91 self
92 }
93
94 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
95 self.config_override = config_override;
96 self
97 }
98 pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.inner = self.inner.account_ids(input.into());
106 self
107 }
108 pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
110 self.inner = self.inner.set_account_ids(input);
111 self
112 }
113 pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
115 self.inner.get_account_ids()
116 }
117 pub fn resource_types(mut self, input: crate::types::ResourceScanType) -> Self {
124 self.inner = self.inner.resource_types(input);
125 self
126 }
127 pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceScanType>>) -> Self {
129 self.inner = self.inner.set_resource_types(input);
130 self
131 }
132 pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceScanType>> {
134 self.inner.get_resource_types()
135 }
136 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.inner = self.inner.client_token(input.into());
139 self
140 }
141 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.inner = self.inner.set_client_token(input);
144 self
145 }
146 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
148 self.inner.get_client_token()
149 }
150}