Skip to main content

aws_sdk_lambda/operation/
invoke_with_response_stream.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `InvokeWithResponseStream`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct InvokeWithResponseStream;
6impl InvokeWithResponseStream {
7    /// Creates a new `InvokeWithResponseStream`
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::invoke_with_response_stream::InvokeWithResponseStreamInput,
14    ) -> ::std::result::Result<
15        crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Lambda", "InvokeWithResponseStream", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "Lambda.InvokeWithResponseStream",
59                "rpc.service" = "Lambda",
60                "rpc.method" = "InvokeWithResponseStream",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74        if let ::std::option::Option::Some(config_override) = config_override {
75            for plugin in config_override.runtime_plugins.iter().cloned() {
76                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77            }
78            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79                config_override,
80                client_config.config.clone(),
81                &client_config.runtime_components,
82            ));
83        }
84        runtime_plugins
85    }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for InvokeWithResponseStream {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("InvokeWithResponseStream");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            InvokeWithResponseStreamRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            InvokeWithResponseStreamResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("InvokeWithResponseStream")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107            "InvokeWithResponseStream",
108            "Lambda",
109        ));
110        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111        signing_options.double_uri_encode = true;
112        signing_options.content_sha256_header = false;
113        signing_options.normalize_uri_path = true;
114        signing_options.payload_override = None;
115
116        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117            signing_options,
118            ..::std::default::Default::default()
119        });
120
121        ::std::option::Option::Some(cfg.freeze())
122    }
123
124    fn runtime_components(
125        &self,
126        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128        #[allow(unused_mut)]
129        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("InvokeWithResponseStream")
130            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131                InvokeWithResponseStreamTelemetryInputCaptureInterceptor,
132            ))
133            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134                InvokeWithResponseStreamEndpointParamsInterceptor,
135            ))
136            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
137                crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
138            >::new())
139            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
140                crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
141            >::new())
142            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
143                crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
144            >::new())
145            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
146                crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
147            >::new());
148
149        ::std::borrow::Cow::Owned(rcb)
150    }
151}
152
153#[derive(Debug)]
154struct InvokeWithResponseStreamTelemetryInputCaptureInterceptor;
155
156#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
157impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeWithResponseStreamTelemetryInputCaptureInterceptor {
158    fn name(&self) -> &'static str {
159        "InvokeWithResponseStreamTelemetryInputCaptureInterceptor"
160    }
161
162    fn read_before_execution(
163        &self,
164        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
165            '_,
166            ::aws_smithy_runtime_api::client::interceptors::context::Input,
167            ::aws_smithy_runtime_api::client::interceptors::context::Output,
168            ::aws_smithy_runtime_api::client::interceptors::context::Error,
169        >,
170        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
171    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
172        // Nothing to do unless the customer opted in by naming members to record.
173        let ::std::option::Option::Some(requested) = cfg
174            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
175            .filter(|r| !r.is_empty())
176        else {
177            return ::std::result::Result::Ok(());
178        };
179
180        let ::std::option::Option::Some(input) = context.input().downcast_ref::<InvokeWithResponseStreamInput>() else {
181            // A mismatched input is not this interceptor's concern; skip quietly.
182            return ::std::result::Result::Ok(());
183        };
184
185        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
186        if requested.should_capture("FunctionName") {
187            if let ::std::option::Option::Some(value) = input.function_name.as_deref() {
188                captured.insert("FunctionName", value);
189            }
190        }
191        if requested.should_capture("ClientContext") {
192            if let ::std::option::Option::Some(value) = input.client_context.as_deref() {
193                captured.insert("ClientContext", value);
194            }
195        }
196        if requested.should_capture("Qualifier") {
197            if let ::std::option::Option::Some(value) = input.qualifier.as_deref() {
198                captured.insert("Qualifier", value);
199            }
200        }
201        if requested.should_capture("TenantId") {
202            if let ::std::option::Option::Some(value) = input.tenant_id.as_deref() {
203                captured.insert("TenantId", value);
204            }
205        }
206
207        cfg.interceptor_state().store_put(captured);
208        ::std::result::Result::Ok(())
209    }
210}
211#[derive(Debug)]
212struct InvokeWithResponseStreamResponseDeserializer;
213impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeWithResponseStreamResponseDeserializer {
214    fn deserialize_streaming(
215        &self,
216        response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
217    ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
218        #[allow(unused_mut)]
219        let mut force_error = false;
220        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
221
222        // If this is an error, defer to the non-streaming parser
223        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
224            return ::std::option::Option::None;
225        }
226        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
227            crate::protocol_serde::shape_invoke_with_response_stream::de_invoke_with_response_stream_http_response(response),
228        ))
229    }
230
231    fn deserialize_nonstreaming_with_config(
232        &self,
233        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
234        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
235    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
236        // For streaming operations, we only hit this case if its an error
237        let body = response.body().bytes().expect("body loaded");
238        crate::protocol_serde::type_erase_result(
239            crate::protocol_serde::shape_invoke_with_response_stream::de_invoke_with_response_stream_http_error(
240                response.status().as_u16(),
241                response.headers(),
242                body,
243            ),
244        )
245    }
246}
247#[derive(Debug)]
248struct InvokeWithResponseStreamRequestSerializer;
249impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeWithResponseStreamRequestSerializer {
250    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
251    fn serialize_input(
252        &self,
253        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
254        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
255    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
256        let input = input
257            .downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput>()
258            .expect("correct type");
259        let _header_serialization_settings = _cfg
260            .load::<crate::serialization_settings::HeaderSerializationSettings>()
261            .cloned()
262            .unwrap_or_default();
263        let mut request_builder = {
264            #[allow(clippy::uninlined_format_args)]
265            fn uri_base(
266                _input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
267                output: &mut ::std::string::String,
268            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
269                use ::std::fmt::Write as _;
270                let input_1 = &_input.function_name;
271                let input_1 = input_1
272                    .as_ref()
273                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
274                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
275                if function_name.is_empty() {
276                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
277                        "function_name",
278                        "cannot be empty or unset",
279                    ));
280                }
281                ::std::write!(
282                    output,
283                    "/2021-11-15/functions/{FunctionName}/response-streaming-invocations",
284                    FunctionName = function_name
285                )
286                .expect("formatting should succeed");
287                ::std::result::Result::Ok(())
288            }
289            fn uri_query(
290                _input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
291                mut output: &mut ::std::string::String,
292            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
293                let mut query = ::aws_smithy_http::query::Writer::new(output);
294                if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
295                    {
296                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
297                    }
298                }
299                ::std::result::Result::Ok(())
300            }
301            #[allow(clippy::unnecessary_wraps)]
302            fn update_http_builder(
303                input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
304                builder: ::http_1x::request::Builder,
305            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
306                let mut uri = ::std::string::String::new();
307                uri_base(input, &mut uri)?;
308                uri_query(input, &mut uri)?;
309                let builder = crate::protocol_serde::shape_invoke_with_response_stream::ser_invoke_with_response_stream_headers(input, builder)?;
310                ::std::result::Result::Ok(builder.method("POST").uri(uri))
311            }
312            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
313            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
314            builder
315        };
316        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_with_response_stream_input::ser_payload_http_payload(
317            input.payload,
318        )?);
319        if let Some(content_length) = body.content_length() {
320            let content_length = content_length.to_string();
321            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
322        }
323        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
324    }
325}
326#[derive(Debug)]
327struct InvokeWithResponseStreamEndpointParamsInterceptor;
328
329#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
330impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeWithResponseStreamEndpointParamsInterceptor {
331    fn name(&self) -> &'static str {
332        "InvokeWithResponseStreamEndpointParamsInterceptor"
333    }
334
335    fn read_before_execution(
336        &self,
337        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
338            '_,
339            ::aws_smithy_runtime_api::client::interceptors::context::Input,
340            ::aws_smithy_runtime_api::client::interceptors::context::Output,
341            ::aws_smithy_runtime_api::client::interceptors::context::Error,
342        >,
343        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
344    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
345        let _input = context
346            .input()
347            .downcast_ref::<InvokeWithResponseStreamInput>()
348            .ok_or("failed to downcast to InvokeWithResponseStreamInput")?;
349
350        let params = crate::config::endpoint::Params::builder()
351            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
352            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
353            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
354            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
355            .build()
356            .map_err(|err| {
357                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
358            })?;
359        cfg.interceptor_state()
360            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
361        ::std::result::Result::Ok(())
362    }
363}
364
365// The get_* functions below are generated from JMESPath expressions in the
366// operationContextParams trait. They target the operation's input shape.
367
368/// Error type for the `InvokeWithResponseStreamError` operation.
369#[non_exhaustive]
370#[derive(::std::fmt::Debug)]
371pub enum InvokeWithResponseStreamError {
372    /// <p>Need additional permissions to configure VPC settings.</p>
373    Ec2AccessDeniedException(crate::types::error::Ec2AccessDeniedException),
374    /// <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
375    Ec2ThrottledException(crate::types::error::Ec2ThrottledException),
376    /// <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
377    Ec2UnexpectedException(crate::types::error::Ec2UnexpectedException),
378    /// <p>An error occurred when reading from or writing to a connected file system.</p>
379    EfsioException(crate::types::error::EfsioException),
380    /// <p>The Lambda function couldn't make a network connection to the configured file system.</p>
381    EfsMountConnectivityException(crate::types::error::EfsMountConnectivityException),
382    /// <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
383    EfsMountFailureException(crate::types::error::EfsMountFailureException),
384    /// <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
385    EfsMountTimeoutException(crate::types::error::EfsMountTimeoutException),
386    /// <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p>
387    EniLimitReachedException(crate::types::error::EniLimitReachedException),
388    /// <p>One of the parameters in the request is not valid.</p>
389    InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
390    /// <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
391    InvalidRequestContentException(crate::types::error::InvalidRequestContentException),
392    /// <p>The runtime or runtime version specified is not supported.</p>
393    InvalidRuntimeException(crate::types::error::InvalidRuntimeException),
394    /// <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
395    InvalidSecurityGroupIdException(crate::types::error::InvalidSecurityGroupIdException),
396    /// <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
397    InvalidSubnetIdException(crate::types::error::InvalidSubnetIdException),
398    /// <p>Lambda could not unzip the deployment package.</p>
399    InvalidZipFileException(crate::types::error::InvalidZipFileException),
400    /// <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
401    KmsAccessDeniedException(crate::types::error::KmsAccessDeniedException),
402    /// <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
403    KmsDisabledException(crate::types::error::KmsDisabledException),
404    /// <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
405    KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
406    /// <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
407    KmsNotFoundException(crate::types::error::KmsNotFoundException),
408    /// <p>The function has no published versions available.</p>
409    NoPublishedVersionException(crate::types::error::NoPublishedVersionException),
410    /// <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
411    RecursiveInvocationException(crate::types::error::RecursiveInvocationException),
412    /// <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p>
413    RequestTooLargeException(crate::types::error::RequestTooLargeException),
414    /// <p>The resource already exists, or another operation is in progress.</p>
415    ResourceConflictException(crate::types::error::ResourceConflictException),
416    /// <p>The resource specified in the request does not exist.</p>
417    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
418    /// <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
419    ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
420    /// <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
421    S3FilesMountConnectivityException(crate::types::error::S3FilesMountConnectivityException),
422    /// <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
423    S3FilesMountFailureException(crate::types::error::S3FilesMountFailureException),
424    /// <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
425    S3FilesMountTimeoutException(crate::types::error::S3FilesMountTimeoutException),
426    /// <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
427    SerializedRequestEntityTooLargeException(crate::types::error::SerializedRequestEntityTooLargeException),
428    /// <p>The Lambda service encountered an internal error.</p>
429    ServiceException(crate::types::error::ServiceException),
430    /// <p>The request would exceed a service quota. For more information about Lambda service quotas, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>. To request a quota increase, see <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">Requesting a quota increase</a> in the <i>Service Quotas User Guide</i>.</p>
431    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
432    /// <p>The <code>afterRestore()</code> <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
433    SnapStartException(crate::types::error::SnapStartException),
434    /// <p>Lambda is initializing your function. You can invoke the function when the <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">function state</a> becomes <code>Active</code>.</p>
435    SnapStartNotReadyException(crate::types::error::SnapStartNotReadyException),
436    /// <p>Lambda couldn't regenerate the SnapStart snapshot for the function. SnapStart-enabled functions periodically regenerate snapshots when their underlying runtime or dependencies change; this regeneration failed. Wait for Lambda to retry, or update the function's configuration to trigger a new snapshot. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Lambda SnapStart</a>.</p>
437    SnapStartRegenerationFailureException(crate::types::error::SnapStartRegenerationFailureException),
438    /// <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
439    SnapStartTimeoutException(crate::types::error::SnapStartTimeoutException),
440    /// <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
441    SubnetIpAddressLimitReachedException(crate::types::error::SubnetIpAddressLimitReachedException),
442    /// <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
443    TooManyRequestsException(crate::types::error::TooManyRequestsException),
444    /// <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
445    UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
446    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
447    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
448    variable wildcard pattern and check `.code()`:
449     \
450    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
451     \
452    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeWithResponseStreamError) for what information is available for the error.")]
453    Unhandled(crate::error::sealed_unhandled::Unhandled),
454}
455impl InvokeWithResponseStreamError {
456    /// Creates the `InvokeWithResponseStreamError::Unhandled` variant from any error type.
457    pub fn unhandled(
458        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
459    ) -> Self {
460        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
461            source: err.into(),
462            meta: ::std::default::Default::default(),
463        })
464    }
465
466    /// Creates the `InvokeWithResponseStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
467    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
468        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
469            source: err.clone().into(),
470            meta: err,
471        })
472    }
473    ///
474    /// Returns error metadata, which includes the error code, message,
475    /// request ID, and potentially additional information.
476    ///
477    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
478        match self {
479            Self::Ec2AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::Ec2ThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::Ec2UnexpectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::EfsioException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::EfsMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::EfsMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::EfsMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::EniLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::InvalidRequestContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::InvalidRuntimeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::InvalidSecurityGroupIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::InvalidSubnetIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::InvalidZipFileException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::KmsAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::KmsDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::KmsNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::NoPublishedVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498            Self::RecursiveInvocationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499            Self::RequestTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500            Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502            Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
503            Self::S3FilesMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
504            Self::S3FilesMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
505            Self::S3FilesMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
506            Self::SerializedRequestEntityTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
507            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
508            Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
509            Self::SnapStartException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
510            Self::SnapStartNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
511            Self::SnapStartRegenerationFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
512            Self::SnapStartTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
513            Self::SubnetIpAddressLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
514            Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
515            Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
516            Self::Unhandled(e) => &e.meta,
517        }
518    }
519    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::Ec2AccessDeniedException`.
520    pub fn is_ec2_access_denied_exception(&self) -> bool {
521        matches!(self, Self::Ec2AccessDeniedException(_))
522    }
523    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::Ec2ThrottledException`.
524    pub fn is_ec2_throttled_exception(&self) -> bool {
525        matches!(self, Self::Ec2ThrottledException(_))
526    }
527    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::Ec2UnexpectedException`.
528    pub fn is_ec2_unexpected_exception(&self) -> bool {
529        matches!(self, Self::Ec2UnexpectedException(_))
530    }
531    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::EfsioException`.
532    pub fn is_efsio_exception(&self) -> bool {
533        matches!(self, Self::EfsioException(_))
534    }
535    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::EfsMountConnectivityException`.
536    pub fn is_efs_mount_connectivity_exception(&self) -> bool {
537        matches!(self, Self::EfsMountConnectivityException(_))
538    }
539    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::EfsMountFailureException`.
540    pub fn is_efs_mount_failure_exception(&self) -> bool {
541        matches!(self, Self::EfsMountFailureException(_))
542    }
543    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::EfsMountTimeoutException`.
544    pub fn is_efs_mount_timeout_exception(&self) -> bool {
545        matches!(self, Self::EfsMountTimeoutException(_))
546    }
547    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::EniLimitReachedException`.
548    pub fn is_eni_limit_reached_exception(&self) -> bool {
549        matches!(self, Self::EniLimitReachedException(_))
550    }
551    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidParameterValueException`.
552    pub fn is_invalid_parameter_value_exception(&self) -> bool {
553        matches!(self, Self::InvalidParameterValueException(_))
554    }
555    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidRequestContentException`.
556    pub fn is_invalid_request_content_exception(&self) -> bool {
557        matches!(self, Self::InvalidRequestContentException(_))
558    }
559    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidRuntimeException`.
560    pub fn is_invalid_runtime_exception(&self) -> bool {
561        matches!(self, Self::InvalidRuntimeException(_))
562    }
563    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidSecurityGroupIdException`.
564    pub fn is_invalid_security_group_id_exception(&self) -> bool {
565        matches!(self, Self::InvalidSecurityGroupIdException(_))
566    }
567    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidSubnetIdException`.
568    pub fn is_invalid_subnet_id_exception(&self) -> bool {
569        matches!(self, Self::InvalidSubnetIdException(_))
570    }
571    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::InvalidZipFileException`.
572    pub fn is_invalid_zip_file_exception(&self) -> bool {
573        matches!(self, Self::InvalidZipFileException(_))
574    }
575    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::KmsAccessDeniedException`.
576    pub fn is_kms_access_denied_exception(&self) -> bool {
577        matches!(self, Self::KmsAccessDeniedException(_))
578    }
579    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::KmsDisabledException`.
580    pub fn is_kms_disabled_exception(&self) -> bool {
581        matches!(self, Self::KmsDisabledException(_))
582    }
583    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::KmsInvalidStateException`.
584    pub fn is_kms_invalid_state_exception(&self) -> bool {
585        matches!(self, Self::KmsInvalidStateException(_))
586    }
587    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::KmsNotFoundException`.
588    pub fn is_kms_not_found_exception(&self) -> bool {
589        matches!(self, Self::KmsNotFoundException(_))
590    }
591    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::NoPublishedVersionException`.
592    pub fn is_no_published_version_exception(&self) -> bool {
593        matches!(self, Self::NoPublishedVersionException(_))
594    }
595    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::RecursiveInvocationException`.
596    pub fn is_recursive_invocation_exception(&self) -> bool {
597        matches!(self, Self::RecursiveInvocationException(_))
598    }
599    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::RequestTooLargeException`.
600    pub fn is_request_too_large_exception(&self) -> bool {
601        matches!(self, Self::RequestTooLargeException(_))
602    }
603    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::ResourceConflictException`.
604    pub fn is_resource_conflict_exception(&self) -> bool {
605        matches!(self, Self::ResourceConflictException(_))
606    }
607    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::ResourceNotFoundException`.
608    pub fn is_resource_not_found_exception(&self) -> bool {
609        matches!(self, Self::ResourceNotFoundException(_))
610    }
611    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::ResourceNotReadyException`.
612    pub fn is_resource_not_ready_exception(&self) -> bool {
613        matches!(self, Self::ResourceNotReadyException(_))
614    }
615    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::S3FilesMountConnectivityException`.
616    pub fn is_s3_files_mount_connectivity_exception(&self) -> bool {
617        matches!(self, Self::S3FilesMountConnectivityException(_))
618    }
619    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::S3FilesMountFailureException`.
620    pub fn is_s3_files_mount_failure_exception(&self) -> bool {
621        matches!(self, Self::S3FilesMountFailureException(_))
622    }
623    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::S3FilesMountTimeoutException`.
624    pub fn is_s3_files_mount_timeout_exception(&self) -> bool {
625        matches!(self, Self::S3FilesMountTimeoutException(_))
626    }
627    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SerializedRequestEntityTooLargeException`.
628    pub fn is_serialized_request_entity_too_large_exception(&self) -> bool {
629        matches!(self, Self::SerializedRequestEntityTooLargeException(_))
630    }
631    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::ServiceException`.
632    pub fn is_service_exception(&self) -> bool {
633        matches!(self, Self::ServiceException(_))
634    }
635    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::ServiceQuotaExceededException`.
636    pub fn is_service_quota_exceeded_exception(&self) -> bool {
637        matches!(self, Self::ServiceQuotaExceededException(_))
638    }
639    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SnapStartException`.
640    pub fn is_snap_start_exception(&self) -> bool {
641        matches!(self, Self::SnapStartException(_))
642    }
643    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SnapStartNotReadyException`.
644    pub fn is_snap_start_not_ready_exception(&self) -> bool {
645        matches!(self, Self::SnapStartNotReadyException(_))
646    }
647    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SnapStartRegenerationFailureException`.
648    pub fn is_snap_start_regeneration_failure_exception(&self) -> bool {
649        matches!(self, Self::SnapStartRegenerationFailureException(_))
650    }
651    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SnapStartTimeoutException`.
652    pub fn is_snap_start_timeout_exception(&self) -> bool {
653        matches!(self, Self::SnapStartTimeoutException(_))
654    }
655    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::SubnetIpAddressLimitReachedException`.
656    pub fn is_subnet_ip_address_limit_reached_exception(&self) -> bool {
657        matches!(self, Self::SubnetIpAddressLimitReachedException(_))
658    }
659    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::TooManyRequestsException`.
660    pub fn is_too_many_requests_exception(&self) -> bool {
661        matches!(self, Self::TooManyRequestsException(_))
662    }
663    /// Returns `true` if the error kind is `InvokeWithResponseStreamError::UnsupportedMediaTypeException`.
664    pub fn is_unsupported_media_type_exception(&self) -> bool {
665        matches!(self, Self::UnsupportedMediaTypeException(_))
666    }
667}
668impl ::std::error::Error for InvokeWithResponseStreamError {
669    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
670        match self {
671            Self::Ec2AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
672            Self::Ec2ThrottledException(_inner) => ::std::option::Option::Some(_inner),
673            Self::Ec2UnexpectedException(_inner) => ::std::option::Option::Some(_inner),
674            Self::EfsioException(_inner) => ::std::option::Option::Some(_inner),
675            Self::EfsMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
676            Self::EfsMountFailureException(_inner) => ::std::option::Option::Some(_inner),
677            Self::EfsMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
678            Self::EniLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
679            Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
680            Self::InvalidRequestContentException(_inner) => ::std::option::Option::Some(_inner),
681            Self::InvalidRuntimeException(_inner) => ::std::option::Option::Some(_inner),
682            Self::InvalidSecurityGroupIdException(_inner) => ::std::option::Option::Some(_inner),
683            Self::InvalidSubnetIdException(_inner) => ::std::option::Option::Some(_inner),
684            Self::InvalidZipFileException(_inner) => ::std::option::Option::Some(_inner),
685            Self::KmsAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
686            Self::KmsDisabledException(_inner) => ::std::option::Option::Some(_inner),
687            Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
688            Self::KmsNotFoundException(_inner) => ::std::option::Option::Some(_inner),
689            Self::NoPublishedVersionException(_inner) => ::std::option::Option::Some(_inner),
690            Self::RecursiveInvocationException(_inner) => ::std::option::Option::Some(_inner),
691            Self::RequestTooLargeException(_inner) => ::std::option::Option::Some(_inner),
692            Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
693            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
694            Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
695            Self::S3FilesMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
696            Self::S3FilesMountFailureException(_inner) => ::std::option::Option::Some(_inner),
697            Self::S3FilesMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
698            Self::SerializedRequestEntityTooLargeException(_inner) => ::std::option::Option::Some(_inner),
699            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
700            Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
701            Self::SnapStartException(_inner) => ::std::option::Option::Some(_inner),
702            Self::SnapStartNotReadyException(_inner) => ::std::option::Option::Some(_inner),
703            Self::SnapStartRegenerationFailureException(_inner) => ::std::option::Option::Some(_inner),
704            Self::SnapStartTimeoutException(_inner) => ::std::option::Option::Some(_inner),
705            Self::SubnetIpAddressLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
706            Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
707            Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
708            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
709        }
710    }
711}
712impl ::std::fmt::Display for InvokeWithResponseStreamError {
713    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
714        match self {
715            Self::Ec2AccessDeniedException(_inner) => _inner.fmt(f),
716            Self::Ec2ThrottledException(_inner) => _inner.fmt(f),
717            Self::Ec2UnexpectedException(_inner) => _inner.fmt(f),
718            Self::EfsioException(_inner) => _inner.fmt(f),
719            Self::EfsMountConnectivityException(_inner) => _inner.fmt(f),
720            Self::EfsMountFailureException(_inner) => _inner.fmt(f),
721            Self::EfsMountTimeoutException(_inner) => _inner.fmt(f),
722            Self::EniLimitReachedException(_inner) => _inner.fmt(f),
723            Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
724            Self::InvalidRequestContentException(_inner) => _inner.fmt(f),
725            Self::InvalidRuntimeException(_inner) => _inner.fmt(f),
726            Self::InvalidSecurityGroupIdException(_inner) => _inner.fmt(f),
727            Self::InvalidSubnetIdException(_inner) => _inner.fmt(f),
728            Self::InvalidZipFileException(_inner) => _inner.fmt(f),
729            Self::KmsAccessDeniedException(_inner) => _inner.fmt(f),
730            Self::KmsDisabledException(_inner) => _inner.fmt(f),
731            Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
732            Self::KmsNotFoundException(_inner) => _inner.fmt(f),
733            Self::NoPublishedVersionException(_inner) => _inner.fmt(f),
734            Self::RecursiveInvocationException(_inner) => _inner.fmt(f),
735            Self::RequestTooLargeException(_inner) => _inner.fmt(f),
736            Self::ResourceConflictException(_inner) => _inner.fmt(f),
737            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
738            Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
739            Self::S3FilesMountConnectivityException(_inner) => _inner.fmt(f),
740            Self::S3FilesMountFailureException(_inner) => _inner.fmt(f),
741            Self::S3FilesMountTimeoutException(_inner) => _inner.fmt(f),
742            Self::SerializedRequestEntityTooLargeException(_inner) => _inner.fmt(f),
743            Self::ServiceException(_inner) => _inner.fmt(f),
744            Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
745            Self::SnapStartException(_inner) => _inner.fmt(f),
746            Self::SnapStartNotReadyException(_inner) => _inner.fmt(f),
747            Self::SnapStartRegenerationFailureException(_inner) => _inner.fmt(f),
748            Self::SnapStartTimeoutException(_inner) => _inner.fmt(f),
749            Self::SubnetIpAddressLimitReachedException(_inner) => _inner.fmt(f),
750            Self::TooManyRequestsException(_inner) => _inner.fmt(f),
751            Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
752            Self::Unhandled(_inner) => {
753                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
754                    write!(f, "unhandled error ({code})")
755                } else {
756                    f.write_str("unhandled error")
757                }
758            }
759        }
760    }
761}
762impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeWithResponseStreamError {
763    fn code(&self) -> ::std::option::Option<&str> {
764        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
765    }
766    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
767        ::std::option::Option::None
768    }
769}
770impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeWithResponseStreamError {
771    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
772        match self {
773            Self::Ec2AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
774            Self::Ec2ThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
775            Self::Ec2UnexpectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
776            Self::EfsioException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
777            Self::EfsMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
778            Self::EfsMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
779            Self::EfsMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
780            Self::EniLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
781            Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
782            Self::InvalidRequestContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
783            Self::InvalidRuntimeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
784            Self::InvalidSecurityGroupIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
785            Self::InvalidSubnetIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
786            Self::InvalidZipFileException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
787            Self::KmsAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
788            Self::KmsDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
789            Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
790            Self::KmsNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
791            Self::NoPublishedVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
792            Self::RecursiveInvocationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
793            Self::RequestTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
794            Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
795            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
796            Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
797            Self::S3FilesMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
798            Self::S3FilesMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
799            Self::S3FilesMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
800            Self::SerializedRequestEntityTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
801            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
802            Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803            Self::SnapStartException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804            Self::SnapStartNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805            Self::SnapStartRegenerationFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806            Self::SnapStartTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807            Self::SubnetIpAddressLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808            Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809            Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
810            Self::Unhandled(_inner) => &_inner.meta,
811        }
812    }
813}
814impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeWithResponseStreamError {
815    fn create_unhandled_error(
816        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
817        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
818    ) -> Self {
819        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
820            source,
821            meta: meta.unwrap_or_default(),
822        })
823    }
824}
825impl ::aws_types::request_id::RequestId for crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError {
826    fn request_id(&self) -> Option<&str> {
827        self.meta().request_id()
828    }
829}
830
831pub use crate::operation::invoke_with_response_stream::_invoke_with_response_stream_input::InvokeWithResponseStreamInput;
832
833pub use crate::operation::invoke_with_response_stream::_invoke_with_response_stream_output::InvokeWithResponseStreamOutput;
834
835mod _invoke_with_response_stream_input;
836
837mod _invoke_with_response_stream_output;
838
839/// Builders
840pub mod builders;