aws_sdk_backup/operation/update_restore_testing_plan/
builders.rs1pub use crate::operation::update_restore_testing_plan::_update_restore_testing_plan_output::UpdateRestoreTestingPlanOutputBuilder;
3
4pub use crate::operation::update_restore_testing_plan::_update_restore_testing_plan_input::UpdateRestoreTestingPlanInputBuilder;
5
6impl crate::operation::update_restore_testing_plan::builders::UpdateRestoreTestingPlanInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_restore_testing_plan();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct UpdateRestoreTestingPlanFluentBuilder {
41 handle: ::std::sync::Arc<crate::client::Handle>,
42 inner: crate::operation::update_restore_testing_plan::builders::UpdateRestoreTestingPlanInputBuilder,
43 config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46 crate::client::customize::internal::CustomizableSend<
47 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanOutput,
48 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanError,
49 > for UpdateRestoreTestingPlanFluentBuilder
50{
51 fn send(
52 self,
53 config_override: crate::config::Builder,
54 ) -> crate::client::customize::internal::BoxFuture<
55 crate::client::customize::internal::SendResult<
56 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanOutput,
57 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanError,
58 >,
59 > {
60 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61 }
62}
63impl UpdateRestoreTestingPlanFluentBuilder {
64 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66 Self {
67 handle,
68 inner: ::std::default::Default::default(),
69 config_override: ::std::option::Option::None,
70 }
71 }
72 pub fn as_input(&self) -> &crate::operation::update_restore_testing_plan::builders::UpdateRestoreTestingPlanInputBuilder {
74 &self.inner
75 }
76 pub async fn send(
85 self,
86 ) -> ::std::result::Result<
87 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanOutput,
88 ::aws_smithy_runtime_api::client::result::SdkError<
89 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanError,
90 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91 >,
92 > {
93 let input = self
94 .inner
95 .build()
96 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97 let runtime_plugins = crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlan::operation_runtime_plugins(
98 self.handle.runtime_plugins.clone(),
99 &self.handle.conf,
100 self.config_override,
101 );
102 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlan::orchestrate(&runtime_plugins, input).await
103 }
104
105 pub fn customize(
107 self,
108 ) -> crate::client::customize::CustomizableOperation<
109 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanOutput,
110 crate::operation::update_restore_testing_plan::UpdateRestoreTestingPlanError,
111 Self,
112 > {
113 crate::client::customize::CustomizableOperation::new(self)
114 }
115 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116 self.set_config_override(::std::option::Option::Some(config_override.into()));
117 self
118 }
119
120 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121 self.config_override = config_override;
122 self
123 }
124 pub fn restore_testing_plan(mut self, input: crate::types::RestoreTestingPlanForUpdate) -> Self {
126 self.inner = self.inner.restore_testing_plan(input);
127 self
128 }
129 pub fn set_restore_testing_plan(mut self, input: ::std::option::Option<crate::types::RestoreTestingPlanForUpdate>) -> Self {
131 self.inner = self.inner.set_restore_testing_plan(input);
132 self
133 }
134 pub fn get_restore_testing_plan(&self) -> &::std::option::Option<crate::types::RestoreTestingPlanForUpdate> {
136 self.inner.get_restore_testing_plan()
137 }
138 pub fn restore_testing_plan_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.inner = self.inner.restore_testing_plan_name(input.into());
141 self
142 }
143 pub fn set_restore_testing_plan_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.inner = self.inner.set_restore_testing_plan_name(input);
146 self
147 }
148 pub fn get_restore_testing_plan_name(&self) -> &::std::option::Option<::std::string::String> {
150 self.inner.get_restore_testing_plan_name()
151 }
152}