aws_sdk_databasemigration/waiters/
endpoint_deleted.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct EndpointDeletedFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder,
18}
19impl EndpointDeletedFluentBuilder {
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_endpoints::builders::DescribeEndpointsInputBuilder {
29 &self.inner
30 }
31 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<
36 crate::waiters::endpoint_deleted::EndpointDeletedFinalPoll,
37 crate::waiters::endpoint_deleted::WaitUntilEndpointDeletedError,
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_endpoints::DescribeEndpoints::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_endpoints::DescribeEndpointsOutput,
59 &crate::operation::describe_endpoints::DescribeEndpointsError,
60 >| {
61 if crate::waiters::matchers::match_describe_endpoints_1fde5333d0c106036(result) {
63 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64 }
65 if crate::waiters::matchers::match_describe_endpoints_01e982130e5ce98de(result) {
67 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
68 }
69 if crate::waiters::matchers::match_describe_endpoints_3de7d2cf38cf7be74(result) {
71 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
72 }
73 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
74 };
75 let operation = move || {
76 let input = input.clone();
77 let runtime_plugins = runtime_plugins.clone();
78 async move { crate::operation::describe_endpoints::DescribeEndpoints::orchestrate(&runtime_plugins, input).await }
79 };
80 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
81 .min_delay(::std::time::Duration::from_secs(5))
82 .max_delay(::std::time::Duration::from_secs(120))
83 .max_wait(max_wait)
84 .time_source(time_source)
85 .sleep_impl(sleep_impl)
86 .acceptor(acceptor)
87 .operation(operation)
88 .build();
89 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
90 }
91 pub fn filters(mut self, input: crate::types::Filter) -> Self {
99 self.inner = self.inner.filters(input);
100 self
101 }
102 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
105 self.inner = self.inner.set_filters(input);
106 self
107 }
108 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
111 self.inner.get_filters()
112 }
113 pub fn max_records(mut self, input: i32) -> Self {
117 self.inner = self.inner.max_records(input);
118 self
119 }
120 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
124 self.inner = self.inner.set_max_records(input);
125 self
126 }
127 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
131 self.inner.get_max_records()
132 }
133 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.inner = self.inner.marker(input.into());
136 self
137 }
138 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_marker(input);
141 self
142 }
143 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_marker()
146 }
147}
148
149pub type EndpointDeletedFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
151 crate::operation::describe_endpoints::DescribeEndpointsOutput,
152 ::aws_smithy_runtime_api::client::result::SdkError<
153 crate::operation::describe_endpoints::DescribeEndpointsError,
154 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
155 >,
156>;
157
158pub type WaitUntilEndpointDeletedError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
160 crate::operation::describe_endpoints::DescribeEndpointsOutput,
161 crate::operation::describe_endpoints::DescribeEndpointsError,
162>;