Skip to main content

aws_sdk_codecommit/operation/
get_blob.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `GetBlob`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetBlob;
6impl GetBlob {
7    /// Creates a new `GetBlob`
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::get_blob::GetBlobInput,
14    ) -> ::std::result::Result<
15        crate::operation::get_blob::GetBlobOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::get_blob::GetBlobError,
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::get_blob::GetBlobError>().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::get_blob::GetBlobOutput>()
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::get_blob::GetBlobInput,
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("CodeCommit", "GetBlob", 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                "CodeCommit.GetBlob",
55                "rpc.service" = "CodeCommit",
56                "rpc.method" = "GetBlob",
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
70        if let ::std::option::Option::Some(config_override) = config_override {
71            for plugin in config_override.runtime_plugins.iter().cloned() {
72                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
73            }
74            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
75                config_override,
76                client_config.config.clone(),
77                &client_config.runtime_components,
78            ));
79        }
80        runtime_plugins
81    }
82}
83impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetBlob {
84    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
85        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetBlob");
86
87        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
88            GetBlobRequestSerializer,
89        ));
90        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
91            GetBlobResponseDeserializer,
92        ));
93
94        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
95            crate::config::auth::Params::builder()
96                .operation_name("GetBlob")
97                .build()
98                .expect("required fields set"),
99        ));
100
101        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetBlob", "CodeCommit"));
102        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
103        signing_options.double_uri_encode = true;
104        signing_options.content_sha256_header = false;
105        signing_options.normalize_uri_path = true;
106        signing_options.payload_override = None;
107
108        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
109            signing_options,
110            ..::std::default::Default::default()
111        });
112
113        ::std::option::Option::Some(cfg.freeze())
114    }
115
116    fn runtime_components(
117        &self,
118        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
119    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
120        #[allow(unused_mut)]
121        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetBlob")
122            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
123                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
124            ))
125            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
126                GetBlobEndpointParamsInterceptor,
127            ))
128            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
129                crate::operation::get_blob::GetBlobError,
130            >::new())
131            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
132                crate::operation::get_blob::GetBlobError,
133            >::new())
134            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
135                crate::operation::get_blob::GetBlobError,
136            >::new());
137
138        ::std::borrow::Cow::Owned(rcb)
139    }
140}
141
142#[derive(Debug)]
143struct GetBlobResponseDeserializer;
144impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetBlobResponseDeserializer {
145    fn deserialize_nonstreaming(
146        &self,
147        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
148    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
149        let (success, status) = (response.status().is_success(), response.status().as_u16());
150        let headers = response.headers();
151        let body = response.body().bytes().expect("body loaded");
152        #[allow(unused_mut)]
153        let mut force_error = false;
154        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
155        let parse_result = if !success && status != 200 || force_error {
156            crate::protocol_serde::shape_get_blob::de_get_blob_http_error(status, headers, body)
157        } else {
158            crate::protocol_serde::shape_get_blob::de_get_blob_http_response(status, headers, body)
159        };
160        crate::protocol_serde::type_erase_result(parse_result)
161    }
162}
163#[derive(Debug)]
164struct GetBlobRequestSerializer;
165impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetBlobRequestSerializer {
166    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
167    fn serialize_input(
168        &self,
169        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
170        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
171    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
172        let input = input.downcast::<crate::operation::get_blob::GetBlobInput>().expect("correct type");
173        let _header_serialization_settings = _cfg
174            .load::<crate::serialization_settings::HeaderSerializationSettings>()
175            .cloned()
176            .unwrap_or_default();
177        let mut request_builder = {
178            #[allow(clippy::uninlined_format_args)]
179            fn uri_base(
180                _input: &crate::operation::get_blob::GetBlobInput,
181                output: &mut ::std::string::String,
182            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
183                use ::std::fmt::Write as _;
184                ::std::write!(output, "/").expect("formatting should succeed");
185                ::std::result::Result::Ok(())
186            }
187            #[allow(clippy::unnecessary_wraps)]
188            fn update_http_builder(
189                input: &crate::operation::get_blob::GetBlobInput,
190                builder: ::http_1x::request::Builder,
191            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
192                let mut uri = ::std::string::String::new();
193                uri_base(input, &mut uri)?;
194                ::std::result::Result::Ok(builder.method("POST").uri(uri))
195            }
196            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
197            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
198            builder = _header_serialization_settings.set_default_header(
199                builder,
200                ::http_1x::header::HeaderName::from_static("x-amz-target"),
201                "CodeCommit_20150413.GetBlob",
202            );
203            builder
204        };
205        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_get_blob::ser_get_blob_input(&input)?);
206        if let Some(content_length) = body.content_length() {
207            let content_length = content_length.to_string();
208            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
209        }
210        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
211    }
212}
213#[derive(Debug)]
214struct GetBlobEndpointParamsInterceptor;
215
216#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
217impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetBlobEndpointParamsInterceptor {
218    fn name(&self) -> &'static str {
219        "GetBlobEndpointParamsInterceptor"
220    }
221
222    fn read_before_execution(
223        &self,
224        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
225            '_,
226            ::aws_smithy_runtime_api::client::interceptors::context::Input,
227            ::aws_smithy_runtime_api::client::interceptors::context::Output,
228            ::aws_smithy_runtime_api::client::interceptors::context::Error,
229        >,
230        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
231    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
232        let _input = context
233            .input()
234            .downcast_ref::<GetBlobInput>()
235            .ok_or("failed to downcast to GetBlobInput")?;
236
237        let params = crate::config::endpoint::Params::builder()
238            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
239            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
240            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
241            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
242            .build()
243            .map_err(|err| {
244                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
245            })?;
246        cfg.interceptor_state()
247            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
248        ::std::result::Result::Ok(())
249    }
250}
251
252// The get_* functions below are generated from JMESPath expressions in the
253// operationContextParams trait. They target the operation's input shape.
254
255/// Error type for the `GetBlobError` operation.
256#[non_exhaustive]
257#[derive(::std::fmt::Debug)]
258pub enum GetBlobError {
259    /// <p>The specified blob does not exist.</p>
260    BlobIdDoesNotExistException(crate::types::error::BlobIdDoesNotExistException),
261    /// <p>A blob ID is required, but was not specified.</p>
262    BlobIdRequiredException(crate::types::error::BlobIdRequiredException),
263    /// <p>An encryption integrity check failed.</p>
264    EncryptionIntegrityChecksFailedException(crate::types::error::EncryptionIntegrityChecksFailedException),
265    /// <p>An encryption key could not be accessed.</p>
266    EncryptionKeyAccessDeniedException(crate::types::error::EncryptionKeyAccessDeniedException),
267    /// <p>The encryption key is disabled.</p>
268    EncryptionKeyDisabledException(crate::types::error::EncryptionKeyDisabledException),
269    /// <p>No encryption key was found.</p>
270    EncryptionKeyNotFoundException(crate::types::error::EncryptionKeyNotFoundException),
271    /// <p>The encryption key is not available.</p>
272    EncryptionKeyUnavailableException(crate::types::error::EncryptionKeyUnavailableException),
273    /// <p>The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html">Quotas</a> in the <i>CodeCommit User Guide</i>.</p>
274    FileTooLargeException(crate::types::error::FileTooLargeException),
275    /// <p>The specified blob is not valid.</p>
276    InvalidBlobIdException(crate::types::error::InvalidBlobIdException),
277    /// <p>A specified repository name is not valid.</p><note>
278    /// <p>This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.</p>
279    /// </note>
280    InvalidRepositoryNameException(crate::types::error::InvalidRepositoryNameException),
281    /// <p>The specified repository does not exist.</p>
282    RepositoryDoesNotExistException(crate::types::error::RepositoryDoesNotExistException),
283    /// <p>A repository name is required, but was not specified.</p>
284    RepositoryNameRequiredException(crate::types::error::RepositoryNameRequiredException),
285    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
286    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
287    variable wildcard pattern and check `.code()`:
288     \
289    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
290     \
291    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetBlobError) for what information is available for the error.")]
292    Unhandled(crate::error::sealed_unhandled::Unhandled),
293}
294impl GetBlobError {
295    /// Creates the `GetBlobError::Unhandled` variant from any error type.
296    pub fn unhandled(
297        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
298    ) -> Self {
299        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
300            source: err.into(),
301            meta: ::std::default::Default::default(),
302        })
303    }
304
305    /// Creates the `GetBlobError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
306    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
307        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
308            source: err.clone().into(),
309            meta: err,
310        })
311    }
312    ///
313    /// Returns error metadata, which includes the error code, message,
314    /// request ID, and potentially additional information.
315    ///
316    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
317        match self {
318            Self::BlobIdDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
319            Self::BlobIdRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
320            Self::EncryptionIntegrityChecksFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
321            Self::EncryptionKeyAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
322            Self::EncryptionKeyDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
323            Self::EncryptionKeyNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
324            Self::EncryptionKeyUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
325            Self::FileTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
326            Self::InvalidBlobIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
327            Self::InvalidRepositoryNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
328            Self::RepositoryDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
329            Self::RepositoryNameRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
330            Self::Unhandled(e) => &e.meta,
331        }
332    }
333    /// Returns `true` if the error kind is `GetBlobError::BlobIdDoesNotExistException`.
334    pub fn is_blob_id_does_not_exist_exception(&self) -> bool {
335        matches!(self, Self::BlobIdDoesNotExistException(_))
336    }
337    /// Returns `true` if the error kind is `GetBlobError::BlobIdRequiredException`.
338    pub fn is_blob_id_required_exception(&self) -> bool {
339        matches!(self, Self::BlobIdRequiredException(_))
340    }
341    /// Returns `true` if the error kind is `GetBlobError::EncryptionIntegrityChecksFailedException`.
342    pub fn is_encryption_integrity_checks_failed_exception(&self) -> bool {
343        matches!(self, Self::EncryptionIntegrityChecksFailedException(_))
344    }
345    /// Returns `true` if the error kind is `GetBlobError::EncryptionKeyAccessDeniedException`.
346    pub fn is_encryption_key_access_denied_exception(&self) -> bool {
347        matches!(self, Self::EncryptionKeyAccessDeniedException(_))
348    }
349    /// Returns `true` if the error kind is `GetBlobError::EncryptionKeyDisabledException`.
350    pub fn is_encryption_key_disabled_exception(&self) -> bool {
351        matches!(self, Self::EncryptionKeyDisabledException(_))
352    }
353    /// Returns `true` if the error kind is `GetBlobError::EncryptionKeyNotFoundException`.
354    pub fn is_encryption_key_not_found_exception(&self) -> bool {
355        matches!(self, Self::EncryptionKeyNotFoundException(_))
356    }
357    /// Returns `true` if the error kind is `GetBlobError::EncryptionKeyUnavailableException`.
358    pub fn is_encryption_key_unavailable_exception(&self) -> bool {
359        matches!(self, Self::EncryptionKeyUnavailableException(_))
360    }
361    /// Returns `true` if the error kind is `GetBlobError::FileTooLargeException`.
362    pub fn is_file_too_large_exception(&self) -> bool {
363        matches!(self, Self::FileTooLargeException(_))
364    }
365    /// Returns `true` if the error kind is `GetBlobError::InvalidBlobIdException`.
366    pub fn is_invalid_blob_id_exception(&self) -> bool {
367        matches!(self, Self::InvalidBlobIdException(_))
368    }
369    /// Returns `true` if the error kind is `GetBlobError::InvalidRepositoryNameException`.
370    pub fn is_invalid_repository_name_exception(&self) -> bool {
371        matches!(self, Self::InvalidRepositoryNameException(_))
372    }
373    /// Returns `true` if the error kind is `GetBlobError::RepositoryDoesNotExistException`.
374    pub fn is_repository_does_not_exist_exception(&self) -> bool {
375        matches!(self, Self::RepositoryDoesNotExistException(_))
376    }
377    /// Returns `true` if the error kind is `GetBlobError::RepositoryNameRequiredException`.
378    pub fn is_repository_name_required_exception(&self) -> bool {
379        matches!(self, Self::RepositoryNameRequiredException(_))
380    }
381}
382impl ::std::error::Error for GetBlobError {
383    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
384        match self {
385            Self::BlobIdDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
386            Self::BlobIdRequiredException(_inner) => ::std::option::Option::Some(_inner),
387            Self::EncryptionIntegrityChecksFailedException(_inner) => ::std::option::Option::Some(_inner),
388            Self::EncryptionKeyAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
389            Self::EncryptionKeyDisabledException(_inner) => ::std::option::Option::Some(_inner),
390            Self::EncryptionKeyNotFoundException(_inner) => ::std::option::Option::Some(_inner),
391            Self::EncryptionKeyUnavailableException(_inner) => ::std::option::Option::Some(_inner),
392            Self::FileTooLargeException(_inner) => ::std::option::Option::Some(_inner),
393            Self::InvalidBlobIdException(_inner) => ::std::option::Option::Some(_inner),
394            Self::InvalidRepositoryNameException(_inner) => ::std::option::Option::Some(_inner),
395            Self::RepositoryDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
396            Self::RepositoryNameRequiredException(_inner) => ::std::option::Option::Some(_inner),
397            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
398        }
399    }
400}
401impl ::std::fmt::Display for GetBlobError {
402    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
403        match self {
404            Self::BlobIdDoesNotExistException(_inner) => _inner.fmt(f),
405            Self::BlobIdRequiredException(_inner) => _inner.fmt(f),
406            Self::EncryptionIntegrityChecksFailedException(_inner) => _inner.fmt(f),
407            Self::EncryptionKeyAccessDeniedException(_inner) => _inner.fmt(f),
408            Self::EncryptionKeyDisabledException(_inner) => _inner.fmt(f),
409            Self::EncryptionKeyNotFoundException(_inner) => _inner.fmt(f),
410            Self::EncryptionKeyUnavailableException(_inner) => _inner.fmt(f),
411            Self::FileTooLargeException(_inner) => _inner.fmt(f),
412            Self::InvalidBlobIdException(_inner) => _inner.fmt(f),
413            Self::InvalidRepositoryNameException(_inner) => _inner.fmt(f),
414            Self::RepositoryDoesNotExistException(_inner) => _inner.fmt(f),
415            Self::RepositoryNameRequiredException(_inner) => _inner.fmt(f),
416            Self::Unhandled(_inner) => {
417                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
418                    write!(f, "unhandled error ({code})")
419                } else {
420                    f.write_str("unhandled error")
421                }
422            }
423        }
424    }
425}
426impl ::aws_smithy_types::retry::ProvideErrorKind for GetBlobError {
427    fn code(&self) -> ::std::option::Option<&str> {
428        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
429    }
430    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
431        ::std::option::Option::None
432    }
433}
434impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetBlobError {
435    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
436        match self {
437            Self::BlobIdDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
438            Self::BlobIdRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
439            Self::EncryptionIntegrityChecksFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
440            Self::EncryptionKeyAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
441            Self::EncryptionKeyDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
442            Self::EncryptionKeyNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
443            Self::EncryptionKeyUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
444            Self::FileTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
445            Self::InvalidBlobIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
446            Self::InvalidRepositoryNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
447            Self::RepositoryDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
448            Self::RepositoryNameRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
449            Self::Unhandled(_inner) => &_inner.meta,
450        }
451    }
452}
453impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetBlobError {
454    fn create_unhandled_error(
455        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
456        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
457    ) -> Self {
458        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
459            source,
460            meta: meta.unwrap_or_default(),
461        })
462    }
463}
464impl ::aws_types::request_id::RequestId for crate::operation::get_blob::GetBlobError {
465    fn request_id(&self) -> Option<&str> {
466        self.meta().request_id()
467    }
468}
469
470pub use crate::operation::get_blob::_get_blob_input::GetBlobInput;
471
472pub use crate::operation::get_blob::_get_blob_output::GetBlobOutput;
473
474mod _get_blob_input;
475
476mod _get_blob_output;
477
478/// Builders
479pub mod builders;