aws_sdk_databasemigration/waiters/
replication_task_stopped.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct ReplicationTaskStoppedFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::describe_replication_tasks::builders::DescribeReplicationTasksInputBuilder,
18}
19impl ReplicationTaskStoppedFluentBuilder {
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_stopped::ReplicationTaskStoppedFinalPoll,
37 crate::waiters::replication_task_stopped::WaitUntilReplicationTaskStoppedError,
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_452b66e112114876a(result) {
63 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64 }
65 if crate::waiters::matchers::match_describe_replication_tasks_1b25aac82a62b94ba(result) {
67 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
68 }
69 if crate::waiters::matchers::match_describe_replication_tasks_d4aeee88c7bfd503a(result) {
71 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
72 }
73 if crate::waiters::matchers::match_describe_replication_tasks_3f7b68c20df47dd3e(result) {
75 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
76 }
77 if crate::waiters::matchers::match_describe_replication_tasks_ffec3dac7ed61b70a(result) {
79 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
80 }
81 if crate::waiters::matchers::match_describe_replication_tasks_407522aecac30ef88(result) {
83 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
84 }
85 if crate::waiters::matchers::match_describe_replication_tasks_3fec7b96d9cc95eed(result) {
87 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
88 }
89 if crate::waiters::matchers::match_describe_replication_tasks_a83ca122dc3e3b2d2(result) {
91 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
92 }
93 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
94 };
95 let operation = move || {
96 let input = input.clone();
97 let runtime_plugins = runtime_plugins.clone();
98 async move { crate::operation::describe_replication_tasks::DescribeReplicationTasks::orchestrate(&runtime_plugins, input).await }
99 };
100 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
101 .min_delay(::std::time::Duration::from_secs(15))
102 .max_delay(::std::time::Duration::from_secs(120))
103 .max_wait(max_wait)
104 .time_source(time_source)
105 .sleep_impl(sleep_impl)
106 .acceptor(acceptor)
107 .operation(operation)
108 .build();
109 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
110 }
111 pub fn filters(mut self, input: crate::types::Filter) -> Self {
119 self.inner = self.inner.filters(input);
120 self
121 }
122 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
125 self.inner = self.inner.set_filters(input);
126 self
127 }
128 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
131 self.inner.get_filters()
132 }
133 pub fn max_records(mut self, input: i32) -> Self {
137 self.inner = self.inner.max_records(input);
138 self
139 }
140 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
144 self.inner = self.inner.set_max_records(input);
145 self
146 }
147 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
151 self.inner.get_max_records()
152 }
153 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155 self.inner = self.inner.marker(input.into());
156 self
157 }
158 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160 self.inner = self.inner.set_marker(input);
161 self
162 }
163 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
165 self.inner.get_marker()
166 }
167 pub fn without_settings(mut self, input: bool) -> Self {
169 self.inner = self.inner.without_settings(input);
170 self
171 }
172 pub fn set_without_settings(mut self, input: ::std::option::Option<bool>) -> Self {
174 self.inner = self.inner.set_without_settings(input);
175 self
176 }
177 pub fn get_without_settings(&self) -> &::std::option::Option<bool> {
179 self.inner.get_without_settings()
180 }
181}
182
183pub type ReplicationTaskStoppedFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
185 crate::operation::describe_replication_tasks::DescribeReplicationTasksOutput,
186 ::aws_smithy_runtime_api::client::result::SdkError<
187 crate::operation::describe_replication_tasks::DescribeReplicationTasksError,
188 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
189 >,
190>;
191
192pub type WaitUntilReplicationTaskStoppedError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
194 crate::operation::describe_replication_tasks::DescribeReplicationTasksOutput,
195 crate::operation::describe_replication_tasks::DescribeReplicationTasksError,
196>;