Skip to main content

aws_sdk_glue/operation/
list_workflows.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `ListWorkflows`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ListWorkflows;
6impl ListWorkflows {
7    /// Creates a new `ListWorkflows`
8    pub fn new() -> Self {
9        Self
10    }
11    /// The schema for this operation's input shape.
12    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::list_workflows::ListWorkflowsInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::list_workflows::ListWorkflowsOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::list_workflows::ListWorkflowsInput,
18    ) -> ::std::result::Result<
19        crate::operation::list_workflows::ListWorkflowsOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::list_workflows::ListWorkflowsError,
22            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23        >,
24    > {
25        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
26            ::aws_smithy_runtime_api::client::interceptors::context::Error,
27            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
28        >| {
29            err.map_service_error(|err| {
30                err.downcast::<crate::operation::list_workflows::ListWorkflowsError>()
31                    .expect("correct error type")
32            })
33        };
34        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
35            .await
36            .map_err(map_err)?;
37        let output = context.finalize().map_err(map_err)?;
38        ::std::result::Result::Ok(
39            output
40                .downcast::<crate::operation::list_workflows::ListWorkflowsOutput>()
41                .expect("correct output type"),
42        )
43    }
44
45    pub(crate) async fn orchestrate_with_stop_point(
46        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
47        input: crate::operation::list_workflows::ListWorkflowsInput,
48        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
49    ) -> ::std::result::Result<
50        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
51        ::aws_smithy_runtime_api::client::result::SdkError<
52            ::aws_smithy_runtime_api::client::interceptors::context::Error,
53            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
54        >,
55    > {
56        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
57        use ::tracing::Instrument;
58        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "ListWorkflows", input, runtime_plugins, stop_point)
59            // Create a parent span for the entire operation. Includes a random, internal-only,
60            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
61            .instrument(::tracing::debug_span!(
62                "Glue.ListWorkflows",
63                "rpc.service" = "Glue",
64                "rpc.method" = "ListWorkflows",
65                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
66                "rpc.system" = "aws-api",
67            ))
68            .await
69    }
70
71    pub(crate) fn operation_runtime_plugins(
72        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
73        client_config: &crate::config::Config,
74        config_override: ::std::option::Option<crate::config::Builder>,
75    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
76        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
77
78        if let ::std::option::Option::Some(config_override) = config_override {
79            for plugin in config_override.runtime_plugins.iter().cloned() {
80                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
81            }
82            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
83                config_override,
84                client_config.config.clone(),
85                &client_config.runtime_components,
86            ));
87        }
88        runtime_plugins
89    }
90}
91/// Per-operation error registry. Contains an entry for every modeled
92/// error this operation can throw.
93///
94/// Used by the schema-serde error path as the operation-scoped lookup
95/// for registry-backed error reification: an error code that does not
96/// match one of the operation's modeled errors directly is resolved
97/// against this registry first, then widened to the service-wide error
98/// registry.
99pub(crate) mod error_registry {
100    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
101        ::aws_smithy_schema::registry::TypeRegistry::builder()
102                            .insert_error_shape(
103                        crate::types::error::InternalServiceException::SCHEMA,
104                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
105                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
106                        },
107                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
108                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
109                        },
110                    )
111.insert_error_shape(
112                        crate::types::error::InvalidInputException::SCHEMA,
113                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
114                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
115                        },
116                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
117                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
118                        },
119                    )
120.insert_error_shape(
121                        crate::types::error::OperationTimeoutException::SCHEMA,
122                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
123                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
124                        },
125                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
126                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
127                        },
128                    )
129                            .build()
130    });
131}
132impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListWorkflows {
133    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
134        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListWorkflows");
135
136        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
137            ListWorkflowsRequestSerializer,
138        ));
139        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
140            ListWorkflowsResponseDeserializer,
141        ));
142
143        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
144            crate::config::auth::Params::builder()
145                .operation_name("ListWorkflows")
146                .build()
147                .expect("required fields set"),
148        ));
149
150        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ListWorkflows", "Glue"));
151        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
152        signing_options.double_uri_encode = true;
153        signing_options.content_sha256_header = false;
154        signing_options.normalize_uri_path = true;
155        signing_options.payload_override = None;
156
157        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
158            signing_options,
159            ..::std::default::Default::default()
160        });
161
162        ::std::option::Option::Some(cfg.freeze())
163    }
164
165    fn runtime_components(
166        &self,
167        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
168    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
169        #[allow(unused_mut)]
170        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListWorkflows")
171            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
172                ListWorkflowsTelemetryInputCaptureInterceptor,
173            ))
174            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
175                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
176            ))
177            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
178                ListWorkflowsEndpointParamsInterceptor,
179            ))
180            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
181                crate::operation::list_workflows::ListWorkflowsError,
182            >::new())
183            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
184                crate::operation::list_workflows::ListWorkflowsError,
185            >::new())
186            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
187                crate::operation::list_workflows::ListWorkflowsError,
188            >::new())
189            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
190                crate::operation::list_workflows::ListWorkflowsError,
191            >::new());
192
193        ::std::borrow::Cow::Owned(rcb)
194    }
195}
196
197#[derive(Debug)]
198struct ListWorkflowsTelemetryInputCaptureInterceptor;
199
200#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
201impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListWorkflowsTelemetryInputCaptureInterceptor {
202    fn name(&self) -> &'static str {
203        "ListWorkflowsTelemetryInputCaptureInterceptor"
204    }
205
206    fn read_before_execution(
207        &self,
208        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
209            '_,
210            ::aws_smithy_runtime_api::client::interceptors::context::Input,
211            ::aws_smithy_runtime_api::client::interceptors::context::Output,
212            ::aws_smithy_runtime_api::client::interceptors::context::Error,
213        >,
214        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
215    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
216        // Nothing to do unless the customer opted in by naming members to record.
217        let ::std::option::Option::Some(requested) = cfg
218            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
219            .filter(|r| !r.is_empty())
220        else {
221            return ::std::result::Result::Ok(());
222        };
223
224        let ::std::option::Option::Some(input) = context.input().downcast_ref::<ListWorkflowsInput>() else {
225            // A mismatched input is not this interceptor's concern; skip quietly.
226            return ::std::result::Result::Ok(());
227        };
228
229        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
230        if requested.should_capture("NextToken") {
231            if let ::std::option::Option::Some(value) = input.next_token.as_deref() {
232                captured.insert("NextToken", value);
233            }
234        }
235
236        cfg.interceptor_state().store_put(captured);
237        ::std::result::Result::Ok(())
238    }
239}
240#[derive(Debug)]
241struct ListWorkflowsResponseDeserializer;
242impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListWorkflowsResponseDeserializer {
243    fn deserialize_nonstreaming_with_config(
244        &self,
245        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
246        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
247    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
248        let (success, status) = (response.status().is_success(), response.status().as_u16());
249        // Load body and headers BEFORE BeforeParseResponse so customizations
250        // (e.g., S3's `body_is_error` check that detects errors returned with
251        // HTTP 200) can inspect them. The legacy non-streaming path also
252        // loads `body` before firing this hook.
253        #[allow(unused_variables)]
254        let body = response.body().bytes().expect("body loaded");
255        let headers = response.headers();
256        #[allow(unused_mut)]
257        let mut force_error = false;
258        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
259        if !success && status != 200 || force_error {
260            let protocol = _cfg
261                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
262                .expect("a SharedClientProtocol is required");
263            #[allow(unused_mut)]
264            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
265                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
266            })?;
267            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
268            let generic = generic_builder.build();
269            let error_code = match generic.code() {
270                ::std::option::Option::Some(code) => code,
271                ::std::option::Option::None => {
272                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
273                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_workflows::ListWorkflowsError::unhandled(generic)),
274                    ))
275                }
276            };
277            let _error_message = generic.message().map(|msg| msg.to_owned());
278            let err = match error_code {
279                "InternalServiceException" => crate::operation::list_workflows::ListWorkflowsError::InternalServiceException({
280                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
281                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
282                            e,
283                        ))
284                    })?;
285                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
286                    tmp.deserialize_members(&mut *deser).map_err(|e| {
287                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
288                            e,
289                        ))
290                    })?;
291                    if tmp.message.is_none() {
292                        tmp.message = _error_message;
293                    }
294                    let tmp = tmp.meta(generic);
295                    tmp.build()
296                }),
297                "InvalidInputException" => crate::operation::list_workflows::ListWorkflowsError::InvalidInputException({
298                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
299                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
300                            e,
301                        ))
302                    })?;
303                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
304                    tmp.deserialize_members(&mut *deser).map_err(|e| {
305                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
306                            e,
307                        ))
308                    })?;
309                    if tmp.message.is_none() {
310                        tmp.message = _error_message;
311                    }
312                    let tmp = tmp.meta(generic);
313                    tmp.build()
314                }),
315                "OperationTimeoutException" => crate::operation::list_workflows::ListWorkflowsError::OperationTimeoutException({
316                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
317                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
318                            e,
319                        ))
320                    })?;
321                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
322                    tmp.deserialize_members(&mut *deser).map_err(|e| {
323                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
324                            e,
325                        ))
326                    })?;
327                    if tmp.message.is_none() {
328                        tmp.message = _error_message;
329                    }
330                    let tmp = tmp.meta(generic);
331                    tmp.build()
332                }),
333                _ => {
334                    // Registry-backed, operation-scoped reification of an error whose
335                    // code this operation does not model directly: the operation's own
336                    // error registry is consulted first, then the lookup widens to the
337                    // service-wide error registry. On a hit, the reified error is attached
338                    // as the source of the returned unhandled error while its metadata
339                    // (code, message, request id) is preserved; on a miss the generic
340                    // error is returned unchanged.
341                    match protocol
342                        .deserialize_error_response(response, _cfg)
343                        .ok()
344                        .and_then(|mut deser| {
345                            ::aws_smithy_schema::registry::reify_error(
346                                crate::operation::list_workflows::error_registry::REGISTRY
347                                    .or(&crate::error_type_registry::REGISTRY),
348                                error_code,
349                                &mut *deser,
350                            )
351                        }) {
352                        ::std::option::Option::Some(source) => <crate::operation::list_workflows::ListWorkflowsError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
353                        ::std::option::Option::None => crate::operation::list_workflows::ListWorkflowsError::generic(generic),
354                    }
355                }
356            };
357            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
358                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
359            ))
360        } else {
361            let protocol = _cfg
362                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
363                .expect("a SharedClientProtocol is required");
364            let mut deser = protocol.deserialize_response(response, ListWorkflows::OUTPUT_SCHEMA, _cfg).map_err(|e| {
365                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
366            })?;
367            // `headers` is already in scope from the top of the function; alias it as
368            // `_response_headers` so MutateOutput customizations have a stable name to
369            // read from.
370            let _response_headers = headers;
371            // `mut` is required because `deserialize_members` and the `MutateOutput`
372            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
373            // empty output has no members and no customizations to run.
374            #[allow(unused_mut)]
375            let mut output = <crate::operation::list_workflows::builders::ListWorkflowsOutputBuilder>::default();
376            output.deserialize_members(&mut *deser).map_err(|e| {
377                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
378            })?;
379            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
380            let output = output.build();
381            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
382        }
383    }
384}
385#[derive(Debug)]
386struct ListWorkflowsRequestSerializer;
387impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListWorkflowsRequestSerializer {
388    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
389    fn serialize_input(
390        &self,
391        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
392        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
393    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
394        let input = input
395            .downcast::<crate::operation::list_workflows::ListWorkflowsInput>()
396            .expect("correct type");
397
398        let protocol = _cfg
399            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
400            .expect("a SharedClientProtocol is required");
401        let mut request = protocol
402            .serialize_request(&input, ListWorkflows::INPUT_SCHEMA, "/", _cfg)
403            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
404
405        return ::std::result::Result::Ok(request);
406    }
407}
408#[derive(Debug)]
409struct ListWorkflowsEndpointParamsInterceptor;
410
411#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
412impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListWorkflowsEndpointParamsInterceptor {
413    fn name(&self) -> &'static str {
414        "ListWorkflowsEndpointParamsInterceptor"
415    }
416
417    fn read_before_execution(
418        &self,
419        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
420            '_,
421            ::aws_smithy_runtime_api::client::interceptors::context::Input,
422            ::aws_smithy_runtime_api::client::interceptors::context::Output,
423            ::aws_smithy_runtime_api::client::interceptors::context::Error,
424        >,
425        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
426    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
427        let _input = context
428            .input()
429            .downcast_ref::<ListWorkflowsInput>()
430            .ok_or("failed to downcast to ListWorkflowsInput")?;
431
432        let params = crate::config::endpoint::Params::builder()
433            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
434            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
435            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
436            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
437            .build()
438            .map_err(|err| {
439                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
440            })?;
441        cfg.interceptor_state()
442            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
443        ::std::result::Result::Ok(())
444    }
445}
446
447// The get_* functions below are generated from JMESPath expressions in the
448// operationContextParams trait. They target the operation's input shape.
449
450/// Error type for the `ListWorkflowsError` operation.
451#[non_exhaustive]
452#[derive(::std::fmt::Debug)]
453pub enum ListWorkflowsError {
454    /// <p>An internal service error occurred.</p>
455    InternalServiceException(crate::types::error::InternalServiceException),
456    /// <p>The input provided was not valid.</p>
457    InvalidInputException(crate::types::error::InvalidInputException),
458    /// <p>The operation timed out.</p>
459    OperationTimeoutException(crate::types::error::OperationTimeoutException),
460    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
461    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
462    variable wildcard pattern and check `.code()`:
463     \
464    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
465     \
466    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListWorkflowsError) for what information is available for the error.")]
467    Unhandled(crate::error::sealed_unhandled::Unhandled),
468}
469impl ListWorkflowsError {
470    /// Creates the `ListWorkflowsError::Unhandled` variant from any error type.
471    pub fn unhandled(
472        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
473    ) -> Self {
474        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
475            source: err.into(),
476            meta: ::std::default::Default::default(),
477        })
478    }
479
480    /// Creates the `ListWorkflowsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
481    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
482        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
483            source: err.clone().into(),
484            meta: err,
485        })
486    }
487    ///
488    /// Returns error metadata, which includes the error code, message,
489    /// request ID, and potentially additional information.
490    ///
491    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
492        match self {
493            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::Unhandled(e) => &e.meta,
497        }
498    }
499    /// Returns `true` if the error kind is `ListWorkflowsError::InternalServiceException`.
500    pub fn is_internal_service_exception(&self) -> bool {
501        matches!(self, Self::InternalServiceException(_))
502    }
503    /// Returns `true` if the error kind is `ListWorkflowsError::InvalidInputException`.
504    pub fn is_invalid_input_exception(&self) -> bool {
505        matches!(self, Self::InvalidInputException(_))
506    }
507    /// Returns `true` if the error kind is `ListWorkflowsError::OperationTimeoutException`.
508    pub fn is_operation_timeout_exception(&self) -> bool {
509        matches!(self, Self::OperationTimeoutException(_))
510    }
511}
512impl ::std::error::Error for ListWorkflowsError {
513    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
514        match self {
515            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
516            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
517            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
518            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
519        }
520    }
521}
522impl ::std::fmt::Display for ListWorkflowsError {
523    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
524        match self {
525            Self::InternalServiceException(_inner) => _inner.fmt(f),
526            Self::InvalidInputException(_inner) => _inner.fmt(f),
527            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
528            Self::Unhandled(_inner) => {
529                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
530                    write!(f, "unhandled error ({code})")
531                } else {
532                    f.write_str("unhandled error")
533                }
534            }
535        }
536    }
537}
538impl ::aws_smithy_types::retry::ProvideErrorKind for ListWorkflowsError {
539    fn code(&self) -> ::std::option::Option<&str> {
540        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
541    }
542    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
543        ::std::option::Option::None
544    }
545}
546impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListWorkflowsError {
547    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
548        match self {
549            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
550            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
551            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
552            Self::Unhandled(_inner) => &_inner.meta,
553        }
554    }
555}
556impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListWorkflowsError {
557    fn create_unhandled_error(
558        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
559        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
560    ) -> Self {
561        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
562            source,
563            meta: meta.unwrap_or_default(),
564        })
565    }
566}
567impl ::aws_types::request_id::RequestId for crate::operation::list_workflows::ListWorkflowsError {
568    fn request_id(&self) -> Option<&str> {
569        self.meta().request_id()
570    }
571}
572
573pub use crate::operation::list_workflows::_list_workflows_input::ListWorkflowsInput;
574
575pub use crate::operation::list_workflows::_list_workflows_output::ListWorkflowsOutput;
576
577mod _list_workflows_input;
578
579mod _list_workflows_output;
580
581/// Builders
582pub mod builders;
583
584/// Paginator for this operation
585pub mod paginator;