aws_sdk_omics/waiters/
workflow_version_active.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct WorkflowVersionActiveFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::get_workflow_version::builders::GetWorkflowVersionInputBuilder,
18}
19impl WorkflowVersionActiveFluentBuilder {
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_workflow_version::builders::GetWorkflowVersionInputBuilder {
29 &self.inner
30 }
31 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<
36 crate::waiters::workflow_version_active::WorkflowVersionActiveFinalPoll,
37 crate::waiters::workflow_version_active::WaitUntilWorkflowVersionActiveError,
38 > {
39 let input = self
40 .inner
41 .build()
42 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
43 let runtime_plugins = crate::operation::get_workflow_version::GetWorkflowVersion::operation_runtime_plugins(
44 self.handle.runtime_plugins.clone(),
45 &self.handle.conf,
46 ::std::option::Option::None,
47 )
48 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
49 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
50 let runtime_components_builder = runtime_plugins
51 .apply_client_configuration(&mut cfg)
52 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
53 let time_components = runtime_components_builder.into_time_components();
54 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
55 let time_source = time_components.time_source().expect("a time source is required by waiters");
56
57 let acceptor = move |result: ::std::result::Result<
58 &crate::operation::get_workflow_version::GetWorkflowVersionOutput,
59 &crate::operation::get_workflow_version::GetWorkflowVersionError,
60 >| {
61 if crate::waiters::matchers::match_get_workflow_version_a0b9c099115634691(result) {
63 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64 }
65 if crate::waiters::matchers::match_get_workflow_version_ab538ef2e7cb9d2b4(result) {
67 return ::aws_smithy_runtime::client::waiters::AcceptorState::Retry;
68 }
69 if crate::waiters::matchers::match_get_workflow_version_45c85fb7765d90d16(result) {
71 return ::aws_smithy_runtime::client::waiters::AcceptorState::Retry;
72 }
73 if crate::waiters::matchers::match_get_workflow_version_f9c483f08ce8cb218(result) {
75 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
76 }
77 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
78 };
79 let operation = move || {
80 let input = input.clone();
81 let runtime_plugins = runtime_plugins.clone();
82 async move { crate::operation::get_workflow_version::GetWorkflowVersion::orchestrate(&runtime_plugins, input).await }
83 };
84 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
85 .min_delay(::std::time::Duration::from_secs(3))
86 .max_delay(::std::time::Duration::from_secs(30))
87 .max_wait(max_wait)
88 .time_source(time_source)
89 .sleep_impl(sleep_impl)
90 .acceptor(acceptor)
91 .operation(operation)
92 .build();
93 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
94 }
95 pub fn workflow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.inner = self.inner.workflow_id(input.into());
98 self
99 }
100 pub fn set_workflow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.inner = self.inner.set_workflow_id(input);
103 self
104 }
105 pub fn get_workflow_id(&self) -> &::std::option::Option<::std::string::String> {
107 self.inner.get_workflow_id()
108 }
109 pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111 self.inner = self.inner.version_name(input.into());
112 self
113 }
114 pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116 self.inner = self.inner.set_version_name(input);
117 self
118 }
119 pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
121 self.inner.get_version_name()
122 }
123 pub fn r#type(mut self, input: crate::types::WorkflowType) -> Self {
125 self.inner = self.inner.r#type(input);
126 self
127 }
128 pub fn set_type(mut self, input: ::std::option::Option<crate::types::WorkflowType>) -> Self {
130 self.inner = self.inner.set_type(input);
131 self
132 }
133 pub fn get_type(&self) -> &::std::option::Option<crate::types::WorkflowType> {
135 self.inner.get_type()
136 }
137 pub fn export(mut self, input: crate::types::WorkflowExport) -> Self {
144 self.inner = self.inner.export(input);
145 self
146 }
147 pub fn set_export(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::WorkflowExport>>) -> Self {
149 self.inner = self.inner.set_export(input);
150 self
151 }
152 pub fn get_export(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::WorkflowExport>> {
154 self.inner.get_export()
155 }
156 pub fn workflow_owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.workflow_owner_id(input.into());
159 self
160 }
161 pub fn set_workflow_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_workflow_owner_id(input);
164 self
165 }
166 pub fn get_workflow_owner_id(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_workflow_owner_id()
169 }
170}
171
172pub type WorkflowVersionActiveFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
174 crate::operation::get_workflow_version::GetWorkflowVersionOutput,
175 ::aws_smithy_runtime_api::client::result::SdkError<
176 crate::operation::get_workflow_version::GetWorkflowVersionError,
177 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
178 >,
179>;
180
181pub type WaitUntilWorkflowVersionActiveError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
183 crate::operation::get_workflow_version::GetWorkflowVersionOutput,
184 crate::operation::get_workflow_version::GetWorkflowVersionError,
185>;