aws_sdk_rtbfabric/waiters/
link_active.rs1#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct LinkActiveFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::get_link::builders::GetLinkInputBuilder,
18}
19impl LinkActiveFluentBuilder {
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_link::builders::GetLinkInputBuilder {
29 &self.inner
30 }
31 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<crate::waiters::link_active::LinkActiveFinalPoll, crate::waiters::link_active::WaitUntilLinkActiveError> {
36 let input = self
37 .inner
38 .build()
39 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
40 let runtime_plugins = crate::operation::get_link::GetLink::operation_runtime_plugins(
41 self.handle.runtime_plugins.clone(),
42 &self.handle.conf,
43 ::std::option::Option::None,
44 )
45 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
46 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
47 let runtime_components_builder = runtime_plugins
48 .apply_client_configuration(&mut cfg)
49 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
50 let time_components = runtime_components_builder.into_time_components();
51 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
52 let time_source = time_components.time_source().expect("a time source is required by waiters");
53
54 let acceptor = move |result: ::std::result::Result<&crate::operation::get_link::GetLinkOutput, &crate::operation::get_link::GetLinkError>| {
55 if crate::waiters::matchers::match_get_link_a0b9c099115634691(result) {
57 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
58 }
59 if crate::waiters::matchers::match_get_link_5ce51eaa16eea4f17(result) {
61 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
62 }
63 if crate::waiters::matchers::match_get_link_f9c483f08ce8cb218(result) {
65 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
66 }
67 if crate::waiters::matchers::match_get_link_8edac4c36e2a37f69(result) {
69 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
70 }
71 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
72 };
73 let operation = move || {
74 let input = input.clone();
75 let runtime_plugins = runtime_plugins.clone();
76 async move { crate::operation::get_link::GetLink::orchestrate(&runtime_plugins, input).await }
77 };
78 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
79 .min_delay(::std::time::Duration::from_secs(30))
80 .max_delay(::std::time::Duration::from_secs(120))
81 .max_wait(max_wait)
82 .time_source(time_source)
83 .sleep_impl(sleep_impl)
84 .acceptor(acceptor)
85 .operation(operation)
86 .build();
87 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
88 }
89 pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.inner = self.inner.gateway_id(input.into());
92 self
93 }
94 pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.inner = self.inner.set_gateway_id(input);
97 self
98 }
99 pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
101 self.inner.get_gateway_id()
102 }
103 pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.inner = self.inner.link_id(input.into());
106 self
107 }
108 pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.inner = self.inner.set_link_id(input);
111 self
112 }
113 pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
115 self.inner.get_link_id()
116 }
117}
118
119pub type LinkActiveFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
121 crate::operation::get_link::GetLinkOutput,
122 ::aws_smithy_runtime_api::client::result::SdkError<
123 crate::operation::get_link::GetLinkError,
124 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
125 >,
126>;
127
128pub type WaitUntilLinkActiveError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
130 crate::operation::get_link::GetLinkOutput,
131 crate::operation::get_link::GetLinkError,
132>;