aws_sdk_arcregionswitch/operation/create_plan/
builders.rs1pub use crate::operation::create_plan::_create_plan_output::CreatePlanOutputBuilder;
3
4pub use crate::operation::create_plan::_create_plan_input::CreatePlanInputBuilder;
5
6impl crate::operation::create_plan::builders::CreatePlanInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_plan::CreatePlanOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_plan::CreatePlanError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_plan();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreatePlanFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_plan::builders::CreatePlanInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_plan::CreatePlanOutput,
36 crate::operation::create_plan::CreatePlanError,
37 > for CreatePlanFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::create_plan::CreatePlanOutput,
45 crate::operation::create_plan::CreatePlanError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreatePlanFluentBuilder {
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 pub fn as_input(&self) -> &crate::operation::create_plan::builders::CreatePlanInputBuilder {
62 &self.inner
63 }
64 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::create_plan::CreatePlanOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_plan::CreatePlanError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::create_plan::CreatePlan::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_plan::CreatePlan::orchestrate(&runtime_plugins, input).await
91 }
92
93 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::create_plan::CreatePlanOutput,
98 crate::operation::create_plan::CreatePlanError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.description(input.into());
115 self
116 }
117 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_description(input);
120 self
121 }
122 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_description()
125 }
126 pub fn workflows(mut self, input: crate::types::Workflow) -> Self {
133 self.inner = self.inner.workflows(input);
134 self
135 }
136 pub fn set_workflows(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Workflow>>) -> Self {
138 self.inner = self.inner.set_workflows(input);
139 self
140 }
141 pub fn get_workflows(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Workflow>> {
143 self.inner.get_workflows()
144 }
145 pub fn execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.execution_role(input.into());
148 self
149 }
150 pub fn set_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.inner = self.inner.set_execution_role(input);
153 self
154 }
155 pub fn get_execution_role(&self) -> &::std::option::Option<::std::string::String> {
157 self.inner.get_execution_role()
158 }
159 pub fn recovery_time_objective_minutes(mut self, input: i32) -> Self {
161 self.inner = self.inner.recovery_time_objective_minutes(input);
162 self
163 }
164 pub fn set_recovery_time_objective_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
166 self.inner = self.inner.set_recovery_time_objective_minutes(input);
167 self
168 }
169 pub fn get_recovery_time_objective_minutes(&self) -> &::std::option::Option<i32> {
171 self.inner.get_recovery_time_objective_minutes()
172 }
173 pub fn associated_alarms(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AssociatedAlarm) -> Self {
180 self.inner = self.inner.associated_alarms(k.into(), v);
181 self
182 }
183 pub fn set_associated_alarms(
185 mut self,
186 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AssociatedAlarm>>,
187 ) -> Self {
188 self.inner = self.inner.set_associated_alarms(input);
189 self
190 }
191 pub fn get_associated_alarms(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AssociatedAlarm>> {
193 self.inner.get_associated_alarms()
194 }
195 pub fn triggers(mut self, input: crate::types::Trigger) -> Self {
202 self.inner = self.inner.triggers(input);
203 self
204 }
205 pub fn set_triggers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Trigger>>) -> Self {
207 self.inner = self.inner.set_triggers(input);
208 self
209 }
210 pub fn get_triggers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Trigger>> {
212 self.inner.get_triggers()
213 }
214 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.inner = self.inner.name(input.into());
217 self
218 }
219 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_name(input);
222 self
223 }
224 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
226 self.inner.get_name()
227 }
228 pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235 self.inner = self.inner.regions(input.into());
236 self
237 }
238 pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
240 self.inner = self.inner.set_regions(input);
241 self
242 }
243 pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
245 self.inner.get_regions()
246 }
247 pub fn recovery_approach(mut self, input: crate::types::RecoveryApproach) -> Self {
249 self.inner = self.inner.recovery_approach(input);
250 self
251 }
252 pub fn set_recovery_approach(mut self, input: ::std::option::Option<crate::types::RecoveryApproach>) -> Self {
254 self.inner = self.inner.set_recovery_approach(input);
255 self
256 }
257 pub fn get_recovery_approach(&self) -> &::std::option::Option<crate::types::RecoveryApproach> {
259 self.inner.get_recovery_approach()
260 }
261 pub fn primary_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263 self.inner = self.inner.primary_region(input.into());
264 self
265 }
266 pub fn set_primary_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.inner = self.inner.set_primary_region(input);
269 self
270 }
271 pub fn get_primary_region(&self) -> &::std::option::Option<::std::string::String> {
273 self.inner.get_primary_region()
274 }
275 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
282 self.inner = self.inner.tags(k.into(), v.into());
283 self
284 }
285 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
287 self.inner = self.inner.set_tags(input);
288 self
289 }
290 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
292 self.inner.get_tags()
293 }
294}