aws_sdk_omics/waiters/
run_running.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct RunRunningFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::get_run::builders::GetRunInputBuilder,
18}
19impl RunRunningFluentBuilder {
20 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
22 Self {
23 handle,
24 inner: ::std::default::Default::default(),
25 }
26 }
27 pub fn as_input(&self) -> &crate::operation::get_run::builders::GetRunInputBuilder {
29 &self.inner
30 }
31 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<crate::waiters::run_running::RunRunningFinalPoll, crate::waiters::run_running::WaitUntilRunRunningError> {
36 let input = self
37 .inner
38 .build()
39 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
40 let runtime_plugins = crate::operation::get_run::GetRun::operation_runtime_plugins(
41 self.handle.runtime_plugins.clone(),
42 &self.handle.conf,
43 ::std::option::Option::None,
44 )
45 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
46 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
47 let runtime_components_builder = runtime_plugins
48 .apply_client_configuration(&mut cfg)
49 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
50 let time_components = runtime_components_builder.into_time_components();
51 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
52 let time_source = time_components.time_source().expect("a time source is required by waiters");
53
54 let acceptor = move |result: ::std::result::Result<&crate::operation::get_run::GetRunOutput, &crate::operation::get_run::GetRunError>| {
55 if crate::waiters::matchers::match_get_run_7943b3b995e719e2c(result) {
57 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
58 }
59 if crate::waiters::matchers::match_get_run_cf7012a6288344f38(result) {
61 return ::aws_smithy_runtime::client::waiters::AcceptorState::Retry;
62 }
63 if crate::waiters::matchers::match_get_run_52681d39a0a9cabe6(result) {
65 return ::aws_smithy_runtime::client::waiters::AcceptorState::Retry;
66 }
67 if crate::waiters::matchers::match_get_run_f9c483f08ce8cb218(result) {
69 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
70 }
71 if crate::waiters::matchers::match_get_run_4ddbeb25cc5547dc0(result) {
73 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
74 }
75 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
76 };
77 let operation = move || {
78 let input = input.clone();
79 let runtime_plugins = runtime_plugins.clone();
80 async move { crate::operation::get_run::GetRun::orchestrate(&runtime_plugins, input).await }
81 };
82 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
83 .min_delay(::std::time::Duration::from_secs(30))
84 .max_delay(::std::time::Duration::from_secs(600))
85 .max_wait(max_wait)
86 .time_source(time_source)
87 .sleep_impl(sleep_impl)
88 .acceptor(acceptor)
89 .operation(operation)
90 .build();
91 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
92 }
93 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.inner = self.inner.id(input.into());
96 self
97 }
98 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.inner = self.inner.set_id(input);
101 self
102 }
103 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
105 self.inner.get_id()
106 }
107 pub fn export(mut self, input: crate::types::RunExport) -> Self {
114 self.inner = self.inner.export(input);
115 self
116 }
117 pub fn set_export(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RunExport>>) -> Self {
119 self.inner = self.inner.set_export(input);
120 self
121 }
122 pub fn get_export(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RunExport>> {
124 self.inner.get_export()
125 }
126}
127
128pub type RunRunningFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
130 crate::operation::get_run::GetRunOutput,
131 ::aws_smithy_runtime_api::client::result::SdkError<
132 crate::operation::get_run::GetRunError,
133 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
134 >,
135>;
136
137pub type WaitUntilRunRunningError =
139 ::aws_smithy_runtime_api::client::waiters::error::WaiterError<crate::operation::get_run::GetRunOutput, crate::operation::get_run::GetRunError>;