Skip to main content

aws_sdk_omics/operation/
start_run.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `StartRun`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct StartRun;
6impl StartRun {
7    /// Creates a new `StartRun`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::start_run::StartRunInput,
14    ) -> ::std::result::Result<
15        crate::operation::start_run::StartRunOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::start_run::StartRunError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err =
22            |err: ::aws_smithy_runtime_api::client::result::SdkError<
23                ::aws_smithy_runtime_api::client::interceptors::context::Error,
24                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
25            >| { err.map_service_error(|err| err.downcast::<crate::operation::start_run::StartRunError>().expect("correct error type")) };
26        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
27            .await
28            .map_err(map_err)?;
29        let output = context.finalize().map_err(map_err)?;
30        ::std::result::Result::Ok(
31            output
32                .downcast::<crate::operation::start_run::StartRunOutput>()
33                .expect("correct output type"),
34        )
35    }
36
37    pub(crate) async fn orchestrate_with_stop_point(
38        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
39        input: crate::operation::start_run::StartRunInput,
40        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
41    ) -> ::std::result::Result<
42        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
43        ::aws_smithy_runtime_api::client::result::SdkError<
44            ::aws_smithy_runtime_api::client::interceptors::context::Error,
45            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
46        >,
47    > {
48        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
49        use ::tracing::Instrument;
50        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Omics", "StartRun", input, runtime_plugins, stop_point)
51            // Create a parent span for the entire operation. Includes a random, internal-only,
52            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
53            .instrument(::tracing::debug_span!(
54                "Omics.StartRun",
55                "rpc.service" = "Omics",
56                "rpc.method" = "StartRun",
57                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
58                "rpc.system" = "aws-api",
59            ))
60            .await
61    }
62
63    pub(crate) fn operation_runtime_plugins(
64        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
65        client_config: &crate::config::Config,
66        config_override: ::std::option::Option<crate::config::Builder>,
67    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
68        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
69        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
70            |token_provider, input| {
71                let input: &mut crate::operation::start_run::StartRunInput = input.downcast_mut().expect("correct type");
72                if input.request_id.is_none() {
73                    input.request_id = ::std::option::Option::Some(token_provider.make_idempotency_token());
74                }
75            },
76        ));
77        if let ::std::option::Option::Some(config_override) = config_override {
78            for plugin in config_override.runtime_plugins.iter().cloned() {
79                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
80            }
81            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
82                config_override,
83                client_config.config.clone(),
84                &client_config.runtime_components,
85            ));
86        }
87        runtime_plugins
88    }
89}
90impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for StartRun {
91    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
92        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("StartRun");
93
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
95            StartRunRequestSerializer,
96        ));
97        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
98            StartRunResponseDeserializer,
99        ));
100
101        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
102            crate::config::auth::Params::builder()
103                .operation_name("StartRun")
104                .build()
105                .expect("required fields set"),
106        ));
107
108        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("StartRun", "Omics"));
109        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
110        signing_options.double_uri_encode = true;
111        signing_options.content_sha256_header = false;
112        signing_options.normalize_uri_path = true;
113        signing_options.payload_override = None;
114
115        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
116            signing_options,
117            ..::std::default::Default::default()
118        });
119
120        ::std::option::Option::Some(cfg.freeze())
121    }
122
123    fn runtime_components(
124        &self,
125        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
126    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
127        #[allow(unused_mut)]
128        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("StartRun")
129            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
130                StartRunTelemetryInputCaptureInterceptor,
131            ))
132            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
133                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
134            ))
135            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
136                StartRunEndpointParamsInterceptor,
137            ))
138            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
139                crate::operation::start_run::StartRunError,
140            >::new())
141            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
142                crate::operation::start_run::StartRunError,
143            >::new())
144            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
145                crate::operation::start_run::StartRunError,
146            >::new());
147
148        ::std::borrow::Cow::Owned(rcb)
149    }
150}
151
152#[derive(Debug)]
153struct StartRunTelemetryInputCaptureInterceptor;
154
155#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
156impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartRunTelemetryInputCaptureInterceptor {
157    fn name(&self) -> &'static str {
158        "StartRunTelemetryInputCaptureInterceptor"
159    }
160
161    fn read_before_execution(
162        &self,
163        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
164            '_,
165            ::aws_smithy_runtime_api::client::interceptors::context::Input,
166            ::aws_smithy_runtime_api::client::interceptors::context::Output,
167            ::aws_smithy_runtime_api::client::interceptors::context::Error,
168        >,
169        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
170    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
171        // Nothing to do unless the customer opted in by naming members to record.
172        let ::std::option::Option::Some(requested) = cfg
173            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
174            .filter(|r| !r.is_empty())
175        else {
176            return ::std::result::Result::Ok(());
177        };
178
179        let ::std::option::Option::Some(input) = context.input().downcast_ref::<StartRunInput>() else {
180            // A mismatched input is not this interceptor's concern; skip quietly.
181            return ::std::result::Result::Ok(());
182        };
183
184        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
185        if requested.should_capture("workflowId") {
186            if let ::std::option::Option::Some(value) = input.workflow_id.as_deref() {
187                captured.insert("workflowId", value);
188            }
189        }
190        if requested.should_capture("runId") {
191            if let ::std::option::Option::Some(value) = input.run_id.as_deref() {
192                captured.insert("runId", value);
193            }
194        }
195        if requested.should_capture("roleArn") {
196            if let ::std::option::Option::Some(value) = input.role_arn.as_deref() {
197                captured.insert("roleArn", value);
198            }
199        }
200        if requested.should_capture("name") {
201            if let ::std::option::Option::Some(value) = input.name.as_deref() {
202                captured.insert("name", value);
203            }
204        }
205        if requested.should_capture("cacheId") {
206            if let ::std::option::Option::Some(value) = input.cache_id.as_deref() {
207                captured.insert("cacheId", value);
208            }
209        }
210        if requested.should_capture("runGroupId") {
211            if let ::std::option::Option::Some(value) = input.run_group_id.as_deref() {
212                captured.insert("runGroupId", value);
213            }
214        }
215        if requested.should_capture("outputUri") {
216            if let ::std::option::Option::Some(value) = input.output_uri.as_deref() {
217                captured.insert("outputUri", value);
218            }
219        }
220        if requested.should_capture("requestId") {
221            if let ::std::option::Option::Some(value) = input.request_id.as_deref() {
222                captured.insert("requestId", value);
223            }
224        }
225        if requested.should_capture("workflowOwnerId") {
226            if let ::std::option::Option::Some(value) = input.workflow_owner_id.as_deref() {
227                captured.insert("workflowOwnerId", value);
228            }
229        }
230        if requested.should_capture("workflowVersionName") {
231            if let ::std::option::Option::Some(value) = input.workflow_version_name.as_deref() {
232                captured.insert("workflowVersionName", value);
233            }
234        }
235        if requested.should_capture("configurationName") {
236            if let ::std::option::Option::Some(value) = input.configuration_name.as_deref() {
237                captured.insert("configurationName", value);
238            }
239        }
240
241        cfg.interceptor_state().store_put(captured);
242        ::std::result::Result::Ok(())
243    }
244}
245#[derive(Debug)]
246struct StartRunResponseDeserializer;
247impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StartRunResponseDeserializer {
248    fn deserialize_nonstreaming_with_config(
249        &self,
250        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
251        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
252    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
253        let (success, status) = (response.status().is_success(), response.status().as_u16());
254        let headers = response.headers();
255        let body = response.body().bytes().expect("body loaded");
256        #[allow(unused_mut)]
257        let mut force_error = false;
258        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
259        let parse_result = if !success && status != 201 || force_error {
260            crate::protocol_serde::shape_start_run::de_start_run_http_error(status, headers, body)
261        } else {
262            crate::protocol_serde::shape_start_run::de_start_run_http_response(status, headers, body)
263        };
264        crate::protocol_serde::type_erase_result(parse_result)
265    }
266}
267#[derive(Debug)]
268struct StartRunRequestSerializer;
269impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartRunRequestSerializer {
270    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
271    fn serialize_input(
272        &self,
273        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
274        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
275    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
276        let input = input.downcast::<crate::operation::start_run::StartRunInput>().expect("correct type");
277        let _header_serialization_settings = _cfg
278            .load::<crate::serialization_settings::HeaderSerializationSettings>()
279            .cloned()
280            .unwrap_or_default();
281        let mut request_builder = {
282            #[allow(clippy::uninlined_format_args)]
283            fn uri_base(
284                _input: &crate::operation::start_run::StartRunInput,
285                output: &mut ::std::string::String,
286            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
287                use ::std::fmt::Write as _;
288                ::std::write!(output, "/run").expect("formatting should succeed");
289                ::std::result::Result::Ok(())
290            }
291            #[allow(clippy::unnecessary_wraps)]
292            fn update_http_builder(
293                input: &crate::operation::start_run::StartRunInput,
294                builder: ::http_1x::request::Builder,
295            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
296                let mut uri = ::std::string::String::new();
297                uri_base(input, &mut uri)?;
298                ::std::result::Result::Ok(builder.method("POST").uri(uri))
299            }
300            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
301            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
302            builder
303        };
304        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_start_run::ser_start_run_input(&input)?);
305        if let Some(content_length) = body.content_length() {
306            let content_length = content_length.to_string();
307            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
308        }
309        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
310    }
311}
312#[derive(Debug)]
313struct StartRunEndpointParamsInterceptor;
314
315#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
316impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartRunEndpointParamsInterceptor {
317    fn name(&self) -> &'static str {
318        "StartRunEndpointParamsInterceptor"
319    }
320
321    fn read_before_execution(
322        &self,
323        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
324            '_,
325            ::aws_smithy_runtime_api::client::interceptors::context::Input,
326            ::aws_smithy_runtime_api::client::interceptors::context::Output,
327            ::aws_smithy_runtime_api::client::interceptors::context::Error,
328        >,
329        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
330    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
331        let _input = context
332            .input()
333            .downcast_ref::<StartRunInput>()
334            .ok_or("failed to downcast to StartRunInput")?;
335
336        let endpoint_prefix = ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new("workflows-").map_err(|err| {
337            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err)
338        })?;
339        cfg.interceptor_state().store_put(endpoint_prefix);
340
341        let params = crate::config::endpoint::Params::builder()
342            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
343            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
344            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
345            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
346            .build()
347            .map_err(|err| {
348                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
349            })?;
350        cfg.interceptor_state()
351            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
352        ::std::result::Result::Ok(())
353    }
354}
355
356// The get_* functions below are generated from JMESPath expressions in the
357// operationContextParams trait. They target the operation's input shape.
358
359/// Error type for the `StartRunError` operation.
360#[non_exhaustive]
361#[derive(::std::fmt::Debug)]
362pub enum StartRunError {
363    /// <p>You do not have sufficient access to perform this action.</p>
364    AccessDeniedException(crate::types::error::AccessDeniedException),
365    /// <p>The request cannot be applied to the target resource in its current state.</p>
366    ConflictException(crate::types::error::ConflictException),
367    /// <p>An unexpected error occurred. Try the request again.</p>
368    InternalServerException(crate::types::error::InternalServerException),
369    /// <p>The request timed out.</p>
370    RequestTimeoutException(crate::types::error::RequestTimeoutException),
371    /// <p>The target resource was not found in the current Region.</p>
372    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
373    /// <p>The request exceeds a service quota.</p>
374    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
375    /// <p>The request was denied due to request throttling.</p>
376    ThrottlingException(crate::types::error::ThrottlingException),
377    /// <p>The input fails to satisfy the constraints specified by an AWS service.</p>
378    ValidationException(crate::types::error::ValidationException),
379    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
380    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
381    variable wildcard pattern and check `.code()`:
382     \
383    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
384     \
385    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StartRunError) for what information is available for the error.")]
386    Unhandled(crate::error::sealed_unhandled::Unhandled),
387}
388impl StartRunError {
389    /// Creates the `StartRunError::Unhandled` variant from any error type.
390    pub fn unhandled(
391        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
392    ) -> Self {
393        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
394            source: err.into(),
395            meta: ::std::default::Default::default(),
396        })
397    }
398
399    /// Creates the `StartRunError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
400    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
401        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
402            source: err.clone().into(),
403            meta: err,
404        })
405    }
406    ///
407    /// Returns error metadata, which includes the error code, message,
408    /// request ID, and potentially additional information.
409    ///
410    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
411        match self {
412            Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
413            Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
414            Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
415            Self::RequestTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
416            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
417            Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
418            Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
419            Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
420            Self::Unhandled(e) => &e.meta,
421        }
422    }
423    /// Returns `true` if the error kind is `StartRunError::AccessDeniedException`.
424    pub fn is_access_denied_exception(&self) -> bool {
425        matches!(self, Self::AccessDeniedException(_))
426    }
427    /// Returns `true` if the error kind is `StartRunError::ConflictException`.
428    pub fn is_conflict_exception(&self) -> bool {
429        matches!(self, Self::ConflictException(_))
430    }
431    /// Returns `true` if the error kind is `StartRunError::InternalServerException`.
432    pub fn is_internal_server_exception(&self) -> bool {
433        matches!(self, Self::InternalServerException(_))
434    }
435    /// Returns `true` if the error kind is `StartRunError::RequestTimeoutException`.
436    pub fn is_request_timeout_exception(&self) -> bool {
437        matches!(self, Self::RequestTimeoutException(_))
438    }
439    /// Returns `true` if the error kind is `StartRunError::ResourceNotFoundException`.
440    pub fn is_resource_not_found_exception(&self) -> bool {
441        matches!(self, Self::ResourceNotFoundException(_))
442    }
443    /// Returns `true` if the error kind is `StartRunError::ServiceQuotaExceededException`.
444    pub fn is_service_quota_exceeded_exception(&self) -> bool {
445        matches!(self, Self::ServiceQuotaExceededException(_))
446    }
447    /// Returns `true` if the error kind is `StartRunError::ThrottlingException`.
448    pub fn is_throttling_exception(&self) -> bool {
449        matches!(self, Self::ThrottlingException(_))
450    }
451    /// Returns `true` if the error kind is `StartRunError::ValidationException`.
452    pub fn is_validation_exception(&self) -> bool {
453        matches!(self, Self::ValidationException(_))
454    }
455}
456impl ::std::error::Error for StartRunError {
457    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
458        match self {
459            Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
460            Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
461            Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
462            Self::RequestTimeoutException(_inner) => ::std::option::Option::Some(_inner),
463            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
464            Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
465            Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
466            Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
467            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
468        }
469    }
470}
471impl ::std::fmt::Display for StartRunError {
472    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
473        match self {
474            Self::AccessDeniedException(_inner) => _inner.fmt(f),
475            Self::ConflictException(_inner) => _inner.fmt(f),
476            Self::InternalServerException(_inner) => _inner.fmt(f),
477            Self::RequestTimeoutException(_inner) => _inner.fmt(f),
478            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
479            Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
480            Self::ThrottlingException(_inner) => _inner.fmt(f),
481            Self::ValidationException(_inner) => _inner.fmt(f),
482            Self::Unhandled(_inner) => {
483                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
484                    write!(f, "unhandled error ({code})")
485                } else {
486                    f.write_str("unhandled error")
487                }
488            }
489        }
490    }
491}
492impl ::aws_smithy_types::retry::ProvideErrorKind for StartRunError {
493    fn code(&self) -> ::std::option::Option<&str> {
494        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
495    }
496    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
497        match self {
498            Self::InternalServerException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
499            Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
500            _ => ::std::option::Option::None,
501        }
502    }
503}
504impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StartRunError {
505    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
506        match self {
507            Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
508            Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
509            Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
510            Self::RequestTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
511            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
512            Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
513            Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
514            Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
515            Self::Unhandled(_inner) => &_inner.meta,
516        }
517    }
518}
519impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StartRunError {
520    fn create_unhandled_error(
521        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
522        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
523    ) -> Self {
524        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
525            source,
526            meta: meta.unwrap_or_default(),
527        })
528    }
529}
530impl ::aws_types::request_id::RequestId for crate::operation::start_run::StartRunError {
531    fn request_id(&self) -> Option<&str> {
532        self.meta().request_id()
533    }
534}
535
536pub use crate::operation::start_run::_start_run_input::StartRunInput;
537
538pub use crate::operation::start_run::_start_run_output::StartRunOutput;
539
540mod _start_run_input;
541
542mod _start_run_output;
543
544/// Builders
545pub mod builders;