aws_sdk_databasemigration/waiters/
replication_task_ready.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct ReplicationTaskReadyFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::describe_replication_tasks::builders::DescribeReplicationTasksInputBuilder,
18}
19impl ReplicationTaskReadyFluentBuilder {
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::describe_replication_tasks::builders::DescribeReplicationTasksInputBuilder {
29 &self.inner
30 }
31 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<
36 crate::waiters::replication_task_ready::ReplicationTaskReadyFinalPoll,
37 crate::waiters::replication_task_ready::WaitUntilReplicationTaskReadyError,
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::describe_replication_tasks::DescribeReplicationTasks::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::describe_replication_tasks::DescribeReplicationTasksOutput,
59 &crate::operation::describe_replication_tasks::DescribeReplicationTasksError,
60 >| {
61 if crate::waiters::matchers::match_describe_replication_tasks_70f07c73ec8841480(result) {
63 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64 }
65 if crate::waiters::matchers::match_describe_replication_tasks_3f7b68c20df47dd3e(result) {
67 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
68 }
69 if crate::waiters::matchers::match_describe_replication_tasks_cbe2482745939cbce(result) {
71 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
72 }
73 if crate::waiters::matchers::match_describe_replication_tasks_605e16d950596db43(result) {
75 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
76 }
77 if crate::waiters::matchers::match_describe_replication_tasks_55c09b535f1f65ecb(result) {
79 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
80 }
81 if crate::waiters::matchers::match_describe_replication_tasks_ffec3dac7ed61b70a(result) {
83 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
84 }
85 if crate::waiters::matchers::match_describe_replication_tasks_407522aecac30ef88(result) {
87 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
88 }
89 if crate::waiters::matchers::match_describe_replication_tasks_3fec7b96d9cc95eed(result) {
91 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
92 }
93 if crate::waiters::matchers::match_describe_replication_tasks_a83ca122dc3e3b2d2(result) {
95 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
96 }
97 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
98 };
99 let operation = move || {
100 let input = input.clone();
101 let runtime_plugins = runtime_plugins.clone();
102 async move { crate::operation::describe_replication_tasks::DescribeReplicationTasks::orchestrate(&runtime_plugins, input).await }
103 };
104 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
105 .min_delay(::std::time::Duration::from_secs(15))
106 .max_delay(::std::time::Duration::from_secs(120))
107 .max_wait(max_wait)
108 .time_source(time_source)
109 .sleep_impl(sleep_impl)
110 .acceptor(acceptor)
111 .operation(operation)
112 .build();
113 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
114 }
115 pub fn filters(mut self, input: crate::types::Filter) -> Self {
123 self.inner = self.inner.filters(input);
124 self
125 }
126 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
129 self.inner = self.inner.set_filters(input);
130 self
131 }
132 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
135 self.inner.get_filters()
136 }
137 pub fn max_records(mut self, input: i32) -> Self {
141 self.inner = self.inner.max_records(input);
142 self
143 }
144 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
148 self.inner = self.inner.set_max_records(input);
149 self
150 }
151 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
155 self.inner.get_max_records()
156 }
157 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.inner = self.inner.marker(input.into());
160 self
161 }
162 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.inner = self.inner.set_marker(input);
165 self
166 }
167 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
169 self.inner.get_marker()
170 }
171 pub fn without_settings(mut self, input: bool) -> Self {
173 self.inner = self.inner.without_settings(input);
174 self
175 }
176 pub fn set_without_settings(mut self, input: ::std::option::Option<bool>) -> Self {
178 self.inner = self.inner.set_without_settings(input);
179 self
180 }
181 pub fn get_without_settings(&self) -> &::std::option::Option<bool> {
183 self.inner.get_without_settings()
184 }
185}
186
187pub type ReplicationTaskReadyFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
189 crate::operation::describe_replication_tasks::DescribeReplicationTasksOutput,
190 ::aws_smithy_runtime_api::client::result::SdkError<
191 crate::operation::describe_replication_tasks::DescribeReplicationTasksError,
192 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
193 >,
194>;
195
196pub type WaitUntilReplicationTaskReadyError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
198 crate::operation::describe_replication_tasks::DescribeReplicationTasksOutput,
199 crate::operation::describe_replication_tasks::DescribeReplicationTasksError,
200>;