aws_sdk_proton/waiters/
service_deleted.rs1#[deprecated(note = "AWS Proton is not accepting new customers.", since = "10/07/2025")]
15#[derive(::std::clone::Clone, ::std::fmt::Debug)]
16pub struct ServiceDeletedFluentBuilder {
17 handle: ::std::sync::Arc<crate::client::Handle>,
18 inner: crate::operation::get_service::builders::GetServiceInputBuilder,
19}
20impl ServiceDeletedFluentBuilder {
21 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
23 Self {
24 handle,
25 inner: ::std::default::Default::default(),
26 }
27 }
28 pub fn as_input(&self) -> &crate::operation::get_service::builders::GetServiceInputBuilder {
30 &self.inner
31 }
32 pub async fn wait(
34 self,
35 max_wait: ::std::time::Duration,
36 ) -> ::std::result::Result<crate::waiters::service_deleted::ServiceDeletedFinalPoll, crate::waiters::service_deleted::WaitUntilServiceDeletedError>
37 {
38 let input = self
39 .inner
40 .build()
41 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
42 let runtime_plugins = crate::operation::get_service::GetService::operation_runtime_plugins(
43 self.handle.runtime_plugins.clone(),
44 &self.handle.conf,
45 ::std::option::Option::None,
46 )
47 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
48 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
49 let runtime_components_builder = runtime_plugins
50 .apply_client_configuration(&mut cfg)
51 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
52 let time_components = runtime_components_builder.into_time_components();
53 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
54 let time_source = time_components.time_source().expect("a time source is required by waiters");
55
56 let acceptor = move |result: ::std::result::Result<
57 &crate::operation::get_service::GetServiceOutput,
58 &crate::operation::get_service::GetServiceError,
59 >| {
60 if crate::waiters::matchers::match_get_service_1cce2c05524fb92d4(result) {
62 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
63 }
64 if crate::waiters::matchers::match_get_service_2e17268fe9502816d(result) {
66 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
67 }
68 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
69 };
70 let operation = move || {
71 let input = input.clone();
72 let runtime_plugins = runtime_plugins.clone();
73 async move { crate::operation::get_service::GetService::orchestrate(&runtime_plugins, input).await }
74 };
75 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
76 .min_delay(::std::time::Duration::from_secs(5))
77 .max_delay(::std::time::Duration::from_secs(4999))
78 .max_wait(max_wait)
79 .time_source(time_source)
80 .sleep_impl(sleep_impl)
81 .acceptor(acceptor)
82 .operation(operation)
83 .build();
84 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
85 }
86 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.inner = self.inner.name(input.into());
89 self
90 }
91 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.inner = self.inner.set_name(input);
94 self
95 }
96 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
98 self.inner.get_name()
99 }
100}
101
102pub type ServiceDeletedFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
104 crate::operation::get_service::GetServiceOutput,
105 ::aws_smithy_runtime_api::client::result::SdkError<
106 crate::operation::get_service::GetServiceError,
107 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
108 >,
109>;
110
111pub type WaitUntilServiceDeletedError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
113 crate::operation::get_service::GetServiceOutput,
114 crate::operation::get_service::GetServiceError,
115>;