AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_stream_transcription.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `StartStreamTranscription`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StartStreamTranscription;
    6      6   
impl StartStreamTranscription {
    7      7   
    /// Creates a new `StartStreamTranscription`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::start_stream_transcription::StartStreamTranscriptionInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::start_stream_transcription::StartStreamTranscriptionOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::start_stream_transcription::StartStreamTranscriptionInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::start_stream_transcription::StartStreamTranscriptionOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::start_stream_transcription::StartStreamTranscriptionError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -140,146 +271,399 @@
  160    166   
  161    167   
        // If this is an error, defer to the non-streaming parser
  162    168   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  163    169   
            return ::std::option::Option::None;
  164    170   
        }
  165    171   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  166    172   
            crate::protocol_serde::shape_start_stream_transcription::de_start_stream_transcription_http_response(response),
  167    173   
        ))
  168    174   
    }
  169    175   
  170         -
    fn deserialize_nonstreaming(
         176  +
    fn deserialize_nonstreaming_with_config(
  171    177   
        &self,
  172    178   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         179  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  173    180   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  174    181   
        // For streaming operations, we only hit this case if its an error
  175    182   
        let body = response.body().bytes().expect("body loaded");
  176         -
        crate::protocol_serde::type_erase_result(
  177         -
            crate::protocol_serde::shape_start_stream_transcription::de_start_stream_transcription_http_error(
  178         -
                response.status().as_u16(),
  179         -
                response.headers(),
  180         -
                body,
  181         -
            ),
  182         -
        )
         183  +
        let status = response.status().as_u16();
         184  +
        let headers = response.headers();
         185  +
        #[allow(unused_mut)]
         186  +
        let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         187  +
            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         188  +
        })?;
         189  +
        generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         190  +
        let generic = generic_builder.build();
         191  +
        let error_code = match generic.code() {
         192  +
            ::std::option::Option::Some(code) => code,
         193  +
            ::std::option::Option::None => {
         194  +
                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                    ::aws_smithy_runtime_api::box_error::BoxError::from(
         196  +
                        crate::operation::start_stream_transcription::StartStreamTranscriptionError::unhandled(generic),
         197  +
                    ),
         198  +
                ))
         199  +
            }
         200  +
        };
         201  +
        let _error_message = generic.message().map(|msg| msg.to_owned());
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        let err = match error_code {
         206  +
            "BadRequestException" => crate::operation::start_stream_transcription::StartStreamTranscriptionError::BadRequestException({
         207  +
                let mut tmp = match protocol
         208  +
                    .deserialize_response(response, crate::types::error::BadRequestException::SCHEMA, _cfg)
         209  +
                    .and_then(|mut deser| {
         210  +
                        crate::types::error::BadRequestException::deserialize_with_response(
         211  +
                            &mut *deser,
         212  +
                            response.headers(),
         213  +
                            response.status().into(),
         214  +
                            body,
         215  +
                        )
         216  +
                    }) {
         217  +
                    ::std::result::Result::Ok(val) => val,
         218  +
                    ::std::result::Result::Err(e) => {
         219  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                        ))
         222  +
                    }
         223  +
                };
         224  +
                tmp.meta = generic;
         225  +
                if tmp.message.is_none() {
         226  +
                    tmp.message = _error_message;
         227  +
                }
         228  +
                tmp
         229  +
            }),
         230  +
            "ConflictException" => crate::operation::start_stream_transcription::StartStreamTranscriptionError::ConflictException({
         231  +
                let mut tmp = match protocol
         232  +
                    .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         233  +
                    .and_then(|mut deser| {
         234  +
                        crate::types::error::ConflictException::deserialize_with_response(
         235  +
                            &mut *deser,
         236  +
                            response.headers(),
         237  +
                            response.status().into(),
         238  +
                            body,
         239  +
                        )
         240  +
                    }) {
         241  +
                    ::std::result::Result::Ok(val) => val,
         242  +
                    ::std::result::Result::Err(e) => {
         243  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         244  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         245  +
                        ))
         246  +
                    }
         247  +
                };
         248  +
                tmp.meta = generic;
         249  +
                if tmp.message.is_none() {
         250  +
                    tmp.message = _error_message;
         251  +
                }
         252  +
                tmp
         253  +
            }),
         254  +
            "InternalFailureException" => crate::operation::start_stream_transcription::StartStreamTranscriptionError::InternalFailureException({
         255  +
                let mut tmp = match protocol
         256  +
                    .deserialize_response(response, crate::types::error::InternalFailureException::SCHEMA, _cfg)
         257  +
                    .and_then(|mut deser| {
         258  +
                        crate::types::error::InternalFailureException::deserialize_with_response(
         259  +
                            &mut *deser,
         260  +
                            response.headers(),
         261  +
                            response.status().into(),
         262  +
                            body,
         263  +
                        )
         264  +
                    }) {
         265  +
                    ::std::result::Result::Ok(val) => val,
         266  +
                    ::std::result::Result::Err(e) => {
         267  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         268  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         269  +
                        ))
         270  +
                    }
         271  +
                };
         272  +
                tmp.meta = generic;
         273  +
                if tmp.message.is_none() {
         274  +
                    tmp.message = _error_message;
         275  +
                }
         276  +
                tmp
         277  +
            }),
         278  +
            "LimitExceededException" => crate::operation::start_stream_transcription::StartStreamTranscriptionError::LimitExceededException({
         279  +
                let mut tmp = match protocol
         280  +
                    .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         281  +
                    .and_then(|mut deser| {
         282  +
                        crate::types::error::LimitExceededException::deserialize_with_response(
         283  +
                            &mut *deser,
         284  +
                            response.headers(),
         285  +
                            response.status().into(),
         286  +
                            body,
         287  +
                        )
         288  +
                    }) {
         289  +
                    ::std::result::Result::Ok(val) => val,
         290  +
                    ::std::result::Result::Err(e) => {
         291  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                        ))
         294  +
                    }
         295  +
                };
         296  +
                tmp.meta = generic;
         297  +
                if tmp.message.is_none() {
         298  +
                    tmp.message = _error_message;
         299  +
                }
         300  +
                tmp
         301  +
            }),
         302  +
            "ServiceUnavailableException" => {
         303  +
                crate::operation::start_stream_transcription::StartStreamTranscriptionError::ServiceUnavailableException({
         304  +
                    let mut tmp = match protocol
         305  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         306  +
                        .and_then(|mut deser| {
         307  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         308  +
                                &mut *deser,
         309  +
                                response.headers(),
         310  +
                                response.status().into(),
         311  +
                                body,
         312  +
                            )
         313  +
                        }) {
         314  +
                        ::std::result::Result::Ok(val) => val,
         315  +
                        ::std::result::Result::Err(e) => {
         316  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         317  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         318  +
                            ))
         319  +
                        }
         320  +
                    };
         321  +
                    tmp.meta = generic;
         322  +
                    if tmp.message.is_none() {
         323  +
                        tmp.message = _error_message;
         324  +
                    }
         325  +
                    tmp
         326  +
                })
         327  +
            }
         328  +
            _ => crate::operation::start_stream_transcription::StartStreamTranscriptionError::generic(generic),
         329  +
        };
         330  +
        ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         331  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         332  +
        ))
  183    333   
    }
  184    334   
}
  185    335   
#[derive(Debug)]
  186    336   
struct StartStreamTranscriptionRequestSerializer;
  187    337   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartStreamTranscriptionRequestSerializer {
  188    338   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  189    339   
    fn serialize_input(
  190    340   
        &self,
  191    341   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  192    342   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  193    343   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  194    344   
        let input = input
  195    345   
            .downcast::<crate::operation::start_stream_transcription::StartStreamTranscriptionInput>()
  196    346   
            .expect("correct type");
  197         -
        let _header_serialization_settings = _cfg
  198         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  199         -
            .cloned()
  200         -
            .unwrap_or_default();
  201         -
        let mut request_builder = {
  202         -
            #[allow(clippy::uninlined_format_args)]
  203         -
            fn uri_base(
  204         -
                _input: &crate::operation::start_stream_transcription::StartStreamTranscriptionInput,
  205         -
                output: &mut ::std::string::String,
  206         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  207         -
                use ::std::fmt::Write as _;
  208         -
                ::std::write!(output, "/stream-transcription").expect("formatting should succeed");
  209         -
                ::std::result::Result::Ok(())
  210         -
            }
  211         -
            #[allow(clippy::unnecessary_wraps)]
  212         -
            fn update_http_builder(
  213         -
                input: &crate::operation::start_stream_transcription::StartStreamTranscriptionInput,
  214         -
                builder: ::http_1x::request::Builder,
  215         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  216         -
                let mut uri = ::std::string::String::new();
  217         -
                uri_base(input, &mut uri)?;
  218         -
                let builder = crate::protocol_serde::shape_start_stream_transcription::ser_start_stream_transcription_headers(input, builder)?;
  219         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  220         -
            }
  221         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  222         -
            builder =
  223         -
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  224         -
            builder
  225         -
        };
  226         -
        let body = ::aws_smithy_types::body::SdkBody::from({
         347  +
        let protocol = _cfg
         348  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         349  +
            .expect("a SharedClientProtocol is required");
         350  +
        let mut request = protocol
         351  +
            .serialize_request(&input, StartStreamTranscription::INPUT_SCHEMA, "", _cfg)
         352  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         353  +
        *request.body_mut() = ::aws_smithy_types::body::SdkBody::from({
  227    354   
            let error_marshaller = crate::event_stream_serde::AudioStreamErrorMarshaller::new();
  228    355   
            let marshaller = crate::event_stream_serde::AudioStreamMarshaller::new();
  229    356   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  230    357   
            _cfg.interceptor_state().store_put(signer_sender);
  231    358   
            ::aws_smithy_types::body::SdkBody::from_body_1_x(::http_body_util::StreamBody::new(input.audio_stream.into_body_stream(
  232    359   
                marshaller,
  233    360   
                error_marshaller,
  234    361   
                signer,
  235    362   
            )))
  236    363   
        });
  237         -
        if let Some(content_length) = body.content_length() {
  238         -
            let content_length = content_length.to_string();
  239         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  240         -
        }
  241         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         364  +
        // The protocol may have set Content-Length based on the initial empty body.
         365  +
        // Remove it since the event stream body has unknown length.
         366  +
        request.headers_mut().remove("Content-Length");
         367  +
        request.headers_mut().insert("Content-Type", "application/vnd.amazon.eventstream");
         368  +
         369  +
        return ::std::result::Result::Ok(request);
  242    370   
    }
  243    371   
}
  244    372   
#[derive(Debug)]
  245    373   
struct StartStreamTranscriptionEndpointParamsInterceptor;
  246    374   
  247    375   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartStreamTranscriptionEndpointParamsInterceptor {
  248    376   
    fn name(&self) -> &'static str {
  249    377   
        "StartStreamTranscriptionEndpointParamsInterceptor"
  250    378   
    }
  251    379   

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_stream_transcription/_start_stream_transcription_input.rs

@@ -259,259 +769,891 @@
  279    279   
    "com.amazonaws.transcribestreaming.synthetic",
  280    280   
    "StartStreamTranscriptionInput",
  281    281   
);
  282    282   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  283    283   
    ::aws_smithy_schema::ShapeId::from_static(
  284    284   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$LanguageCode",
  285    285   
        "com.amazonaws.transcribestreaming.synthetic",
  286    286   
        "StartStreamTranscriptionInput",
  287    287   
    ),
  288    288   
    ::aws_smithy_schema::ShapeType::String,
  289         -
    "language_code",
         289  +
    "LanguageCode",
  290    290   
    0,
  291    291   
)
  292    292   
.with_http_header("x-amzn-transcribe-language-code");
  293    293   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  294    294   
    ::aws_smithy_schema::ShapeId::from_static(
  295    295   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$MediaSampleRateHertz",
  296    296   
        "com.amazonaws.transcribestreaming.synthetic",
  297    297   
        "StartStreamTranscriptionInput",
  298    298   
    ),
  299    299   
    ::aws_smithy_schema::ShapeType::Integer,
  300         -
    "media_sample_rate_hertz",
         300  +
    "MediaSampleRateHertz",
  301    301   
    1,
  302    302   
)
  303    303   
.with_http_header("x-amzn-transcribe-sample-rate");
  304    304   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  305    305   
    ::aws_smithy_schema::ShapeId::from_static(
  306    306   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$MediaEncoding",
  307    307   
        "com.amazonaws.transcribestreaming.synthetic",
  308    308   
        "StartStreamTranscriptionInput",
  309    309   
    ),
  310    310   
    ::aws_smithy_schema::ShapeType::String,
  311         -
    "media_encoding",
         311  +
    "MediaEncoding",
  312    312   
    2,
  313    313   
)
  314    314   
.with_http_header("x-amzn-transcribe-media-encoding");
  315    315   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  316    316   
    ::aws_smithy_schema::ShapeId::from_static(
  317    317   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$VocabularyName",
  318    318   
        "com.amazonaws.transcribestreaming.synthetic",
  319    319   
        "StartStreamTranscriptionInput",
  320    320   
    ),
  321    321   
    ::aws_smithy_schema::ShapeType::String,
  322         -
    "vocabulary_name",
         322  +
    "VocabularyName",
  323    323   
    3,
  324    324   
)
  325    325   
.with_http_header("x-amzn-transcribe-vocabulary-name");
  326    326   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  327    327   
    ::aws_smithy_schema::ShapeId::from_static(
  328    328   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$SessionId",
  329    329   
        "com.amazonaws.transcribestreaming.synthetic",
  330    330   
        "StartStreamTranscriptionInput",
  331    331   
    ),
  332    332   
    ::aws_smithy_schema::ShapeType::String,
  333         -
    "session_id",
         333  +
    "SessionId",
  334    334   
    4,
  335    335   
)
  336    336   
.with_http_header("x-amzn-transcribe-session-id");
  337    337   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  338    338   
    ::aws_smithy_schema::ShapeId::from_static(
  339    339   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$AudioStream",
  340    340   
        "com.amazonaws.transcribestreaming.synthetic",
  341    341   
        "StartStreamTranscriptionInput",
  342    342   
    ),
  343    343   
    ::aws_smithy_schema::ShapeType::Union,
  344         -
    "audio_stream",
         344  +
    "AudioStream",
  345    345   
    5,
  346    346   
)
  347    347   
.with_http_payload();
  348    348   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  349    349   
    ::aws_smithy_schema::ShapeId::from_static(
  350    350   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$VocabularyFilterName",
  351    351   
        "com.amazonaws.transcribestreaming.synthetic",
  352    352   
        "StartStreamTranscriptionInput",
  353    353   
    ),
  354    354   
    ::aws_smithy_schema::ShapeType::String,
  355         -
    "vocabulary_filter_name",
         355  +
    "VocabularyFilterName",
  356    356   
    6,
  357    357   
)
  358    358   
.with_http_header("x-amzn-transcribe-vocabulary-filter-name");
  359    359   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_METHOD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  360    360   
    ::aws_smithy_schema::ShapeId::from_static(
  361    361   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$VocabularyFilterMethod",
  362    362   
        "com.amazonaws.transcribestreaming.synthetic",
  363    363   
        "StartStreamTranscriptionInput",
  364    364   
    ),
  365    365   
    ::aws_smithy_schema::ShapeType::String,
  366         -
    "vocabulary_filter_method",
         366  +
    "VocabularyFilterMethod",
  367    367   
    7,
  368    368   
)
  369    369   
.with_http_header("x-amzn-transcribe-vocabulary-filter-method");
  370    370   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  371    371   
    ::aws_smithy_schema::ShapeId::from_static(
  372    372   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$ShowSpeakerLabel",
  373    373   
        "com.amazonaws.transcribestreaming.synthetic",
  374    374   
        "StartStreamTranscriptionInput",
  375    375   
    ),
  376    376   
    ::aws_smithy_schema::ShapeType::Boolean,
  377         -
    "show_speaker_label",
         377  +
    "ShowSpeakerLabel",
  378    378   
    8,
  379    379   
)
  380    380   
.with_http_header("x-amzn-transcribe-show-speaker-label");
  381    381   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  382    382   
    ::aws_smithy_schema::ShapeId::from_static(
  383    383   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$EnableChannelIdentification",
  384    384   
        "com.amazonaws.transcribestreaming.synthetic",
  385    385   
        "StartStreamTranscriptionInput",
  386    386   
    ),
  387    387   
    ::aws_smithy_schema::ShapeType::Boolean,
  388         -
    "enable_channel_identification",
         388  +
    "EnableChannelIdentification",
  389    389   
    9,
  390    390   
)
  391    391   
.with_http_header("x-amzn-transcribe-enable-channel-identification");
  392    392   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  393    393   
    ::aws_smithy_schema::ShapeId::from_static(
  394    394   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$NumberOfChannels",
  395    395   
        "com.amazonaws.transcribestreaming.synthetic",
  396    396   
        "StartStreamTranscriptionInput",
  397    397   
    ),
  398    398   
    ::aws_smithy_schema::ShapeType::Integer,
  399         -
    "number_of_channels",
         399  +
    "NumberOfChannels",
  400    400   
    10,
  401    401   
)
  402    402   
.with_http_header("x-amzn-transcribe-number-of-channels");
  403    403   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION: ::aws_smithy_schema::Schema =
  404    404   
    ::aws_smithy_schema::Schema::new_member(
  405    405   
        ::aws_smithy_schema::ShapeId::from_static(
  406    406   
            "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$EnablePartialResultsStabilization",
  407    407   
            "com.amazonaws.transcribestreaming.synthetic",
  408    408   
            "StartStreamTranscriptionInput",
  409    409   
        ),
  410    410   
        ::aws_smithy_schema::ShapeType::Boolean,
  411         -
        "enable_partial_results_stabilization",
         411  +
        "EnablePartialResultsStabilization",
  412    412   
        11,
  413    413   
    )
  414    414   
    .with_http_header("x-amzn-transcribe-enable-partial-results-stabilization");
  415    415   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PARTIAL_RESULTS_STABILITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  416    416   
    ::aws_smithy_schema::ShapeId::from_static(
  417    417   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$PartialResultsStability",
  418    418   
        "com.amazonaws.transcribestreaming.synthetic",
  419    419   
        "StartStreamTranscriptionInput",
  420    420   
    ),
  421    421   
    ::aws_smithy_schema::ShapeType::String,
  422         -
    "partial_results_stability",
         422  +
    "PartialResultsStability",
  423    423   
    12,
  424    424   
)
  425    425   
.with_http_header("x-amzn-transcribe-partial-results-stability");
  426    426   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  427    427   
    ::aws_smithy_schema::ShapeId::from_static(
  428    428   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$ContentIdentificationType",
  429    429   
        "com.amazonaws.transcribestreaming.synthetic",
  430    430   
        "StartStreamTranscriptionInput",
  431    431   
    ),
  432    432   
    ::aws_smithy_schema::ShapeType::String,
  433         -
    "content_identification_type",
         433  +
    "ContentIdentificationType",
  434    434   
    13,
  435    435   
)
  436    436   
.with_http_header("x-amzn-transcribe-content-identification-type");
  437    437   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_REDACTION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  438    438   
    ::aws_smithy_schema::ShapeId::from_static(
  439    439   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$ContentRedactionType",
  440    440   
        "com.amazonaws.transcribestreaming.synthetic",
  441    441   
        "StartStreamTranscriptionInput",
  442    442   
    ),
  443    443   
    ::aws_smithy_schema::ShapeType::String,
  444         -
    "content_redaction_type",
         444  +
    "ContentRedactionType",
  445    445   
    14,
  446    446   
)
  447    447   
.with_http_header("x-amzn-transcribe-content-redaction-type");
  448    448   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PII_ENTITY_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  449    449   
    ::aws_smithy_schema::ShapeId::from_static(
  450    450   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$PiiEntityTypes",
  451    451   
        "com.amazonaws.transcribestreaming.synthetic",
  452    452   
        "StartStreamTranscriptionInput",
  453    453   
    ),
  454    454   
    ::aws_smithy_schema::ShapeType::String,
  455         -
    "pii_entity_types",
         455  +
    "PiiEntityTypes",
  456    456   
    15,
  457    457   
)
  458    458   
.with_http_header("x-amzn-transcribe-pii-entity-types");
  459    459   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_MODEL_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  460    460   
    ::aws_smithy_schema::ShapeId::from_static(
  461    461   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$LanguageModelName",
  462    462   
        "com.amazonaws.transcribestreaming.synthetic",
  463    463   
        "StartStreamTranscriptionInput",
  464    464   
    ),
  465    465   
    ::aws_smithy_schema::ShapeType::String,
  466         -
    "language_model_name",
         466  +
    "LanguageModelName",
  467    467   
    16,
  468    468   
)
  469    469   
.with_http_header("x-amzn-transcribe-language-model-name");
  470    470   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  471    471   
    ::aws_smithy_schema::ShapeId::from_static(
  472    472   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$IdentifyLanguage",
  473    473   
        "com.amazonaws.transcribestreaming.synthetic",
  474    474   
        "StartStreamTranscriptionInput",
  475    475   
    ),
  476    476   
    ::aws_smithy_schema::ShapeType::Boolean,
  477         -
    "identify_language",
         477  +
    "IdentifyLanguage",
  478    478   
    17,
  479    479   
)
  480    480   
.with_http_header("x-amzn-transcribe-identify-language");
  481    481   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_OPTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  482    482   
    ::aws_smithy_schema::ShapeId::from_static(
  483    483   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$LanguageOptions",
  484    484   
        "com.amazonaws.transcribestreaming.synthetic",
  485    485   
        "StartStreamTranscriptionInput",
  486    486   
    ),
  487    487   
    ::aws_smithy_schema::ShapeType::String,
  488         -
    "language_options",
         488  +
    "LanguageOptions",
  489    489   
    18,
  490    490   
)
  491    491   
.with_http_header("x-amzn-transcribe-language-options");
  492    492   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PREFERRED_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  493    493   
    ::aws_smithy_schema::ShapeId::from_static(
  494    494   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$PreferredLanguage",
  495    495   
        "com.amazonaws.transcribestreaming.synthetic",
  496    496   
        "StartStreamTranscriptionInput",
  497    497   
    ),
  498    498   
    ::aws_smithy_schema::ShapeType::String,
  499         -
    "preferred_language",
         499  +
    "PreferredLanguage",
  500    500   
    19,
  501    501   
)
  502    502   
.with_http_header("x-amzn-transcribe-preferred-language");
  503    503   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_MULTIPLE_LANGUAGES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  504    504   
    ::aws_smithy_schema::ShapeId::from_static(
  505    505   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$IdentifyMultipleLanguages",
  506    506   
        "com.amazonaws.transcribestreaming.synthetic",
  507    507   
        "StartStreamTranscriptionInput",
  508    508   
    ),
  509    509   
    ::aws_smithy_schema::ShapeType::Boolean,
  510         -
    "identify_multiple_languages",
         510  +
    "IdentifyMultipleLanguages",
  511    511   
    20,
  512    512   
)
  513    513   
.with_http_header("x-amzn-transcribe-identify-multiple-languages");
  514    514   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  515    515   
    ::aws_smithy_schema::ShapeId::from_static(
  516    516   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$VocabularyNames",
  517    517   
        "com.amazonaws.transcribestreaming.synthetic",
  518    518   
        "StartStreamTranscriptionInput",
  519    519   
    ),
  520    520   
    ::aws_smithy_schema::ShapeType::String,
  521         -
    "vocabulary_names",
         521  +
    "VocabularyNames",
  522    522   
    21,
  523    523   
)
  524    524   
.with_http_header("x-amzn-transcribe-vocabulary-names");
  525    525   
static STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  526    526   
    ::aws_smithy_schema::ShapeId::from_static(
  527    527   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionInput$VocabularyFilterNames",
  528    528   
        "com.amazonaws.transcribestreaming.synthetic",
  529    529   
        "StartStreamTranscriptionInput",
  530    530   
    ),
  531    531   
    ::aws_smithy_schema::ShapeType::String,
  532         -
    "vocabulary_filter_names",
         532  +
    "VocabularyFilterNames",
  533    533   
    22,
  534    534   
)
  535    535   
.with_http_header("x-amzn-transcribe-vocabulary-filter-names");
  536    536   
static STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  537    537   
    STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA_ID,
  538    538   
    ::aws_smithy_schema::ShapeType::Structure,
  539    539   
    &[
  540    540   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE,
  541    541   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  542    542   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING,
  543    543   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME,
  544    544   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID,
  545    545   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM,
  546    546   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAME,
  547    547   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_METHOD,
  548    548   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL,
  549    549   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION,
  550    550   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS,
  551    551   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION,
  552    552   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PARTIAL_RESULTS_STABILITY,
  553    553   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
  554    554   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_REDACTION_TYPE,
  555    555   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PII_ENTITY_TYPES,
  556    556   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_MODEL_NAME,
  557    557   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_LANGUAGE,
  558    558   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_OPTIONS,
  559    559   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PREFERRED_LANGUAGE,
  560    560   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_MULTIPLE_LANGUAGES,
  561    561   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAMES,
  562    562   
        &STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAMES,
  563    563   
    ],
  564         -
);
         564  +
)
         565  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/stream-transcription", None));
  565    566   
impl StartStreamTranscriptionInput {
  566    567   
    /// The schema for this shape.
  567    568   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA;
  568    569   
}
  569    570   
impl ::aws_smithy_schema::serde::SerializableStruct for StartStreamTranscriptionInput {
  570    571   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  571    572   
    fn serialize_members(
  572    573   
        &self,
  573    574   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  574    575   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  575    576   
        if let Some(ref val) = self.language_code {
  576    577   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  577    578   
        }
  578    579   
        if let Some(ref val) = self.media_sample_rate_hertz {
  579    580   
            ser.write_integer(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  580    581   
        }
  581    582   
        if let Some(ref val) = self.media_encoding {
  582    583   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  583    584   
        }
  584    585   
        if let Some(ref val) = self.vocabulary_name {
  585    586   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME, val)?;
  586    587   
        }
  587    588   
        if let Some(ref val) = self.session_id {
  588    589   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID, val)?;
  589    590   
        }
  590         -
        {
  591         -
            let val = &self.audio_stream;
  592         -
            ser.write_null(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM)?;
  593         -
        }
  594    591   
        if let Some(ref val) = self.vocabulary_filter_name {
  595    592   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAME, val)?;
  596    593   
        }
  597    594   
        if let Some(ref val) = self.vocabulary_filter_method {
  598    595   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_METHOD, val.as_str())?;
  599    596   
        }
  600    597   
        if let Some(ref val) = self.show_speaker_label {
  601    598   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL, *val)?;
  602    599   
        }
  603    600   
        if let Some(ref val) = self.enable_channel_identification {
  604    601   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION, *val)?;
  605    602   
        }
  606    603   
        if let Some(ref val) = self.number_of_channels {
  607    604   
            ser.write_integer(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS, *val)?;
  608    605   
        }
  609    606   
        if let Some(ref val) = self.enable_partial_results_stabilization {
  610    607   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION, *val)?;
  611    608   
        }
  612    609   
        if let Some(ref val) = self.partial_results_stability {
  613    610   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PARTIAL_RESULTS_STABILITY, val.as_str())?;
  614    611   
        }
  615    612   
        if let Some(ref val) = self.content_identification_type {
  616    613   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE, val.as_str())?;
  617    614   
        }
  618    615   
        if let Some(ref val) = self.content_redaction_type {
  619    616   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_REDACTION_TYPE, val.as_str())?;
  620    617   
        }
  621    618   
        if let Some(ref val) = self.pii_entity_types {
  622    619   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PII_ENTITY_TYPES, val)?;
  623    620   
        }
  624    621   
        if let Some(ref val) = self.language_model_name {
  625    622   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_MODEL_NAME, val)?;
  626    623   
        }
  627    624   
        if let Some(ref val) = self.identify_language {
  628    625   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_LANGUAGE, *val)?;
  629    626   
        }
  630    627   
        if let Some(ref val) = self.language_options {
  631    628   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_OPTIONS, val)?;
  632    629   
        }
  633    630   
        if let Some(ref val) = self.preferred_language {
  634    631   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_PREFERRED_LANGUAGE, val.as_str())?;
  635    632   
        }
  636    633   
        if let Some(ref val) = self.identify_multiple_languages {
  637    634   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_IDENTIFY_MULTIPLE_LANGUAGES, *val)?;
  638    635   
        }
  639    636   
        if let Some(ref val) = self.vocabulary_names {
  640    637   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAMES, val)?;
  641    638   
        }
  642    639   
        if let Some(ref val) = self.vocabulary_filter_names {
  643    640   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_FILTER_NAMES, val)?;
  644    641   
        }
  645    642   
        Ok(())
  646    643   
    }
  647    644   
}
  648    645   
impl StartStreamTranscriptionInput {
  649    646   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  650         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  651         -
        deserializer: &mut D,
         647  +
    pub fn deserialize(
         648  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  652    649   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  653    650   
        #[allow(unused_variables, unused_mut)]
  654    651   
        let mut builder = Self::builder();
  655    652   
        #[allow(
  656    653   
            unused_variables,
  657    654   
            unreachable_code,
  658    655   
            clippy::single_match,
  659    656   
            clippy::match_single_binding,
  660    657   
            clippy::diverging_sub_expression
  661    658   
        )]
  662         -
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA, (), |_, member, deser| {
         659  +
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA, &mut |member, deser| {
  663    660   
            match member.member_index() {
  664    661   
                Some(0) => {
  665    662   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  666    663   
                }
  667    664   
                Some(1) => {
  668    665   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  669    666   
                }
  670    667   
                Some(2) => {
  671    668   
                    builder.media_encoding = Some(crate::types::MediaEncoding::from(deser.read_string(member)?.as_str()));
  672    669   
                }
  673    670   
                Some(3) => {
  674    671   
                    builder.vocabulary_name = Some(deser.read_string(member)?);
  675    672   
                }
  676    673   
                Some(4) => {
  677    674   
                    builder.session_id = Some(deser.read_string(member)?);
  678    675   
                }
  679    676   
                Some(5) => {
  680    677   
                    builder.audio_stream = Some({
  681    678   
                        let _ = member;
  682         -
                        todo!("deserialize aggregate")
         679  +
                        todo!("deserialize streaming union")
  683    680   
                    });
  684    681   
                }
  685    682   
                Some(6) => {
  686    683   
                    builder.vocabulary_filter_name = Some(deser.read_string(member)?);
  687    684   
                }
  688    685   
                Some(7) => {
  689    686   
                    builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(deser.read_string(member)?.as_str()));
  690    687   
                }
  691    688   
                Some(8) => {
  692    689   
                    builder.show_speaker_label = Some(deser.read_boolean(member)?);
  693    690   
                }
  694    691   
                Some(9) => {
  695    692   
                    builder.enable_channel_identification = Some(deser.read_boolean(member)?);
  696    693   
                }
  697    694   
                Some(10) => {
  698    695   
                    builder.number_of_channels = Some(deser.read_integer(member)?);
  699    696   
                }
  700    697   
                Some(11) => {
  701    698   
                    builder.enable_partial_results_stabilization = Some(deser.read_boolean(member)?);
  702    699   
                }
  703    700   
                Some(12) => {
  704    701   
                    builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(deser.read_string(member)?.as_str()));
  705    702   
                }
  706    703   
                Some(13) => {
  707    704   
                    builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(deser.read_string(member)?.as_str()));
  708    705   
                }
  709    706   
                Some(14) => {
  710    707   
                    builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(deser.read_string(member)?.as_str()));
  711    708   
                }
  712    709   
                Some(15) => {
  713    710   
                    builder.pii_entity_types = Some(deser.read_string(member)?);
  714    711   
                }
  715    712   
                Some(16) => {
  716    713   
                    builder.language_model_name = Some(deser.read_string(member)?);
  717    714   
                }
  718    715   
                Some(17) => {
  719    716   
                    builder.identify_language = Some(deser.read_boolean(member)?);
  720    717   
                }
  721    718   
                Some(18) => {
  722    719   
                    builder.language_options = Some(deser.read_string(member)?);
  723    720   
                }
  724    721   
                Some(19) => {
  725    722   
                    builder.preferred_language = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  726    723   
                }
  727    724   
                Some(20) => {
  728    725   
                    builder.identify_multiple_languages = Some(deser.read_boolean(member)?);
  729    726   
                }
  730    727   
                Some(21) => {
  731    728   
                    builder.vocabulary_names = Some(deser.read_string(member)?);
  732    729   
                }
  733    730   
                Some(22) => {
  734    731   
                    builder.vocabulary_filter_names = Some(deser.read_string(member)?);
  735    732   
                }
  736    733   
                _ => {}
  737    734   
            }
  738    735   
            Ok(())
  739    736   
        })?;
         737  +
        builder.media_sample_rate_hertz = builder.media_sample_rate_hertz.or(Some(0i32));
         738  +
        builder
         739  +
            .build()
         740  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         741  +
    }
         742  +
}
         743  +
impl StartStreamTranscriptionInput {
         744  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         745  +
    /// Header-bound members are read directly from headers, avoiding runtime
         746  +
    /// member iteration overhead. Body members are read via the deserializer.
         747  +
    pub fn deserialize_with_response(
         748  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         749  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         750  +
        _status: u16,
         751  +
        _body: &[u8],
         752  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         753  +
        #[allow(unused_variables, unused_mut)]
         754  +
        let mut builder = Self::builder();
         755  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         756  +
            builder.language_code = Some(crate::types::LanguageCode::from(val));
         757  +
        }
         758  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         759  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         760  +
        }
         761  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         762  +
            builder.media_encoding = Some(crate::types::MediaEncoding::from(val));
         763  +
        }
         764  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-name") {
         765  +
            builder.vocabulary_name = Some(val.to_string());
         766  +
        }
         767  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         768  +
            builder.session_id = Some(val.to_string());
         769  +
        }
         770  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-name") {
         771  +
            builder.vocabulary_filter_name = Some(val.to_string());
         772  +
        }
         773  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-method") {
         774  +
            builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(val));
         775  +
        }
         776  +
        if let Some(val) = headers.get("x-amzn-transcribe-show-speaker-label") {
         777  +
            builder.show_speaker_label = val.parse::<bool>().ok();
         778  +
        }
         779  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-channel-identification") {
         780  +
            builder.enable_channel_identification = val.parse::<bool>().ok();
         781  +
        }
         782  +
        if let Some(val) = headers.get("x-amzn-transcribe-number-of-channels") {
         783  +
            builder.number_of_channels = val.parse::<i32>().ok();
         784  +
        }
         785  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-partial-results-stabilization") {
         786  +
            builder.enable_partial_results_stabilization = val.parse::<bool>().ok();
         787  +
        }
         788  +
        if let Some(val) = headers.get("x-amzn-transcribe-partial-results-stability") {
         789  +
            builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(val));
         790  +
        }
         791  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-identification-type") {
         792  +
            builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(val));
         793  +
        }
         794  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-redaction-type") {
         795  +
            builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(val));
         796  +
        }
         797  +
        if let Some(val) = headers.get("x-amzn-transcribe-pii-entity-types") {
         798  +
            builder.pii_entity_types = Some(val.to_string());
         799  +
        }
         800  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-model-name") {
         801  +
            builder.language_model_name = Some(val.to_string());
         802  +
        }
         803  +
        if let Some(val) = headers.get("x-amzn-transcribe-identify-language") {
         804  +
            builder.identify_language = val.parse::<bool>().ok();
         805  +
        }
         806  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-options") {
         807  +
            builder.language_options = Some(val.to_string());
         808  +
        }
         809  +
        if let Some(val) = headers.get("x-amzn-transcribe-preferred-language") {
         810  +
            builder.preferred_language = Some(crate::types::LanguageCode::from(val));
         811  +
        }
         812  +
        if let Some(val) = headers.get("x-amzn-transcribe-identify-multiple-languages") {
         813  +
            builder.identify_multiple_languages = val.parse::<bool>().ok();
         814  +
        }
         815  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-names") {
         816  +
            builder.vocabulary_names = Some(val.to_string());
         817  +
        }
         818  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-names") {
         819  +
            builder.vocabulary_filter_names = Some(val.to_string());
         820  +
        }
         821  +
        #[allow(
         822  +
            unused_variables,
         823  +
            unreachable_code,
         824  +
            clippy::single_match,
         825  +
            clippy::match_single_binding,
         826  +
            clippy::diverging_sub_expression
         827  +
        )]
         828  +
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONINPUT_SCHEMA, &mut |member, deser| {
         829  +
            match member.member_index() {
         830  +
                Some(0) => { /* read from headers above */ }
         831  +
                Some(1) => { /* read from headers above */ }
         832  +
                Some(2) => { /* read from headers above */ }
         833  +
                Some(3) => { /* read from headers above */ }
         834  +
                Some(4) => { /* read from headers above */ }
         835  +
                Some(5) => {
         836  +
                    builder.audio_stream = Some({
         837  +
                        let _ = member;
         838  +
                        todo!("deserialize streaming union")
         839  +
                    });
         840  +
                }
         841  +
                Some(6) => { /* read from headers above */ }
         842  +
                Some(7) => { /* read from headers above */ }
         843  +
                Some(8) => { /* read from headers above */ }
         844  +
                Some(9) => { /* read from headers above */ }
         845  +
                Some(10) => { /* read from headers above */ }
         846  +
                Some(11) => { /* read from headers above */ }
         847  +
                Some(12) => { /* read from headers above */ }
         848  +
                Some(13) => { /* read from headers above */ }
         849  +
                Some(14) => { /* read from headers above */ }
         850  +
                Some(15) => { /* read from headers above */ }
         851  +
                Some(16) => { /* read from headers above */ }
         852  +
                Some(17) => { /* read from headers above */ }
         853  +
                Some(18) => { /* read from headers above */ }
         854  +
                Some(19) => { /* read from headers above */ }
         855  +
                Some(20) => { /* read from headers above */ }
         856  +
                Some(21) => { /* read from headers above */ }
         857  +
                Some(22) => { /* read from headers above */ }
         858  +
                _ => {}
         859  +
            }
         860  +
            Ok(())
         861  +
        })?;
  740    862   
        builder
  741    863   
            .build()
  742    864   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  743    865   
    }
  744    866   
}
  745    867   
impl StartStreamTranscriptionInput {
  746    868   
    /// Creates a new builder-style object to manufacture [`StartStreamTranscriptionInput`](crate::operation::start_stream_transcription::StartStreamTranscriptionInput).
  747    869   
    pub fn builder() -> crate::operation::start_stream_transcription::builders::StartStreamTranscriptionInputBuilder {
  748    870   
        crate::operation::start_stream_transcription::builders::StartStreamTranscriptionInputBuilder::default()
  749    871   
    }

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_stream_transcription/_start_stream_transcription_output.rs

@@ -139,139 +518,522 @@
  159    159   
    "com.amazonaws.transcribestreaming.synthetic",
  160    160   
    "StartStreamTranscriptionOutput",
  161    161   
);
  162    162   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  163    163   
    ::aws_smithy_schema::ShapeId::from_static(
  164    164   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$RequestId",
  165    165   
        "com.amazonaws.transcribestreaming.synthetic",
  166    166   
        "StartStreamTranscriptionOutput",
  167    167   
    ),
  168    168   
    ::aws_smithy_schema::ShapeType::String,
  169         -
    "request_id",
         169  +
    "RequestId",
  170    170   
    0,
  171    171   
)
  172    172   
.with_http_header("x-amzn-request-id");
  173    173   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  174    174   
    ::aws_smithy_schema::ShapeId::from_static(
  175    175   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$LanguageCode",
  176    176   
        "com.amazonaws.transcribestreaming.synthetic",
  177    177   
        "StartStreamTranscriptionOutput",
  178    178   
    ),
  179    179   
    ::aws_smithy_schema::ShapeType::String,
  180         -
    "language_code",
         180  +
    "LanguageCode",
  181    181   
    1,
  182    182   
)
  183    183   
.with_http_header("x-amzn-transcribe-language-code");
  184    184   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  185    185   
    ::aws_smithy_schema::ShapeId::from_static(
  186    186   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$MediaSampleRateHertz",
  187    187   
        "com.amazonaws.transcribestreaming.synthetic",
  188    188   
        "StartStreamTranscriptionOutput",
  189    189   
    ),
  190    190   
    ::aws_smithy_schema::ShapeType::Integer,
  191         -
    "media_sample_rate_hertz",
         191  +
    "MediaSampleRateHertz",
  192    192   
    2,
  193    193   
)
  194    194   
.with_http_header("x-amzn-transcribe-sample-rate");
  195    195   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  196    196   
    ::aws_smithy_schema::ShapeId::from_static(
  197    197   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$MediaEncoding",
  198    198   
        "com.amazonaws.transcribestreaming.synthetic",
  199    199   
        "StartStreamTranscriptionOutput",
  200    200   
    ),
  201    201   
    ::aws_smithy_schema::ShapeType::String,
  202         -
    "media_encoding",
         202  +
    "MediaEncoding",
  203    203   
    3,
  204    204   
)
  205    205   
.with_http_header("x-amzn-transcribe-media-encoding");
  206    206   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  207    207   
    ::aws_smithy_schema::ShapeId::from_static(
  208    208   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$VocabularyName",
  209    209   
        "com.amazonaws.transcribestreaming.synthetic",
  210    210   
        "StartStreamTranscriptionOutput",
  211    211   
    ),
  212    212   
    ::aws_smithy_schema::ShapeType::String,
  213         -
    "vocabulary_name",
         213  +
    "VocabularyName",
  214    214   
    4,
  215    215   
)
  216    216   
.with_http_header("x-amzn-transcribe-vocabulary-name");
  217    217   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  218    218   
    ::aws_smithy_schema::ShapeId::from_static(
  219    219   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$SessionId",
  220    220   
        "com.amazonaws.transcribestreaming.synthetic",
  221    221   
        "StartStreamTranscriptionOutput",
  222    222   
    ),
  223    223   
    ::aws_smithy_schema::ShapeType::String,
  224         -
    "session_id",
         224  +
    "SessionId",
  225    225   
    5,
  226    226   
)
  227    227   
.with_http_header("x-amzn-transcribe-session-id");
  228    228   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  229    229   
    ::aws_smithy_schema::ShapeId::from_static(
  230    230   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$TranscriptResultStream",
  231    231   
        "com.amazonaws.transcribestreaming.synthetic",
  232    232   
        "StartStreamTranscriptionOutput",
  233    233   
    ),
  234    234   
    ::aws_smithy_schema::ShapeType::Union,
  235         -
    "transcript_result_stream",
         235  +
    "TranscriptResultStream",
  236    236   
    6,
  237    237   
)
  238    238   
.with_http_payload();
  239    239   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  240    240   
    ::aws_smithy_schema::ShapeId::from_static(
  241    241   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$VocabularyFilterName",
  242    242   
        "com.amazonaws.transcribestreaming.synthetic",
  243    243   
        "StartStreamTranscriptionOutput",
  244    244   
    ),
  245    245   
    ::aws_smithy_schema::ShapeType::String,
  246         -
    "vocabulary_filter_name",
         246  +
    "VocabularyFilterName",
  247    247   
    7,
  248    248   
)
  249    249   
.with_http_header("x-amzn-transcribe-vocabulary-filter-name");
  250    250   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  251    251   
    ::aws_smithy_schema::ShapeId::from_static(
  252    252   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$VocabularyFilterMethod",
  253    253   
        "com.amazonaws.transcribestreaming.synthetic",
  254    254   
        "StartStreamTranscriptionOutput",
  255    255   
    ),
  256    256   
    ::aws_smithy_schema::ShapeType::String,
  257         -
    "vocabulary_filter_method",
         257  +
    "VocabularyFilterMethod",
  258    258   
    8,
  259    259   
)
  260    260   
.with_http_header("x-amzn-transcribe-vocabulary-filter-method");
  261    261   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  262    262   
    ::aws_smithy_schema::ShapeId::from_static(
  263    263   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$ShowSpeakerLabel",
  264    264   
        "com.amazonaws.transcribestreaming.synthetic",
  265    265   
        "StartStreamTranscriptionOutput",
  266    266   
    ),
  267    267   
    ::aws_smithy_schema::ShapeType::Boolean,
  268         -
    "show_speaker_label",
         268  +
    "ShowSpeakerLabel",
  269    269   
    9,
  270    270   
)
  271    271   
.with_http_header("x-amzn-transcribe-show-speaker-label");
  272    272   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  273    273   
    ::aws_smithy_schema::ShapeId::from_static(
  274    274   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$EnableChannelIdentification",
  275    275   
        "com.amazonaws.transcribestreaming.synthetic",
  276    276   
        "StartStreamTranscriptionOutput",
  277    277   
    ),
  278    278   
    ::aws_smithy_schema::ShapeType::Boolean,
  279         -
    "enable_channel_identification",
         279  +
    "EnableChannelIdentification",
  280    280   
    10,
  281    281   
)
  282    282   
.with_http_header("x-amzn-transcribe-enable-channel-identification");
  283    283   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_NUMBER_OF_CHANNELS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  284    284   
    ::aws_smithy_schema::ShapeId::from_static(
  285    285   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$NumberOfChannels",
  286    286   
        "com.amazonaws.transcribestreaming.synthetic",
  287    287   
        "StartStreamTranscriptionOutput",
  288    288   
    ),
  289    289   
    ::aws_smithy_schema::ShapeType::Integer,
  290         -
    "number_of_channels",
         290  +
    "NumberOfChannels",
  291    291   
    11,
  292    292   
)
  293    293   
.with_http_header("x-amzn-transcribe-number-of-channels");
  294    294   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION: ::aws_smithy_schema::Schema =
  295    295   
    ::aws_smithy_schema::Schema::new_member(
  296    296   
        ::aws_smithy_schema::ShapeId::from_static(
  297    297   
            "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$EnablePartialResultsStabilization",
  298    298   
            "com.amazonaws.transcribestreaming.synthetic",
  299    299   
            "StartStreamTranscriptionOutput",
  300    300   
        ),
  301    301   
        ::aws_smithy_schema::ShapeType::Boolean,
  302         -
        "enable_partial_results_stabilization",
         302  +
        "EnablePartialResultsStabilization",
  303    303   
        12,
  304    304   
    )
  305    305   
    .with_http_header("x-amzn-transcribe-enable-partial-results-stabilization");
  306    306   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PARTIAL_RESULTS_STABILITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  307    307   
    ::aws_smithy_schema::ShapeId::from_static(
  308    308   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$PartialResultsStability",
  309    309   
        "com.amazonaws.transcribestreaming.synthetic",
  310    310   
        "StartStreamTranscriptionOutput",
  311    311   
    ),
  312    312   
    ::aws_smithy_schema::ShapeType::String,
  313         -
    "partial_results_stability",
         313  +
    "PartialResultsStability",
  314    314   
    13,
  315    315   
)
  316    316   
.with_http_header("x-amzn-transcribe-partial-results-stability");
  317    317   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  318    318   
    ::aws_smithy_schema::ShapeId::from_static(
  319    319   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$ContentIdentificationType",
  320    320   
        "com.amazonaws.transcribestreaming.synthetic",
  321    321   
        "StartStreamTranscriptionOutput",
  322    322   
    ),
  323    323   
    ::aws_smithy_schema::ShapeType::String,
  324         -
    "content_identification_type",
         324  +
    "ContentIdentificationType",
  325    325   
    14,
  326    326   
)
  327    327   
.with_http_header("x-amzn-transcribe-content-identification-type");
  328    328   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_REDACTION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  329    329   
    ::aws_smithy_schema::ShapeId::from_static(
  330    330   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$ContentRedactionType",
  331    331   
        "com.amazonaws.transcribestreaming.synthetic",
  332    332   
        "StartStreamTranscriptionOutput",
  333    333   
    ),
  334    334   
    ::aws_smithy_schema::ShapeType::String,
  335         -
    "content_redaction_type",
         335  +
    "ContentRedactionType",
  336    336   
    15,
  337    337   
)
  338    338   
.with_http_header("x-amzn-transcribe-content-redaction-type");
  339    339   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PII_ENTITY_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  340    340   
    ::aws_smithy_schema::ShapeId::from_static(
  341    341   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$PiiEntityTypes",
  342    342   
        "com.amazonaws.transcribestreaming.synthetic",
  343    343   
        "StartStreamTranscriptionOutput",
  344    344   
    ),
  345    345   
    ::aws_smithy_schema::ShapeType::String,
  346         -
    "pii_entity_types",
         346  +
    "PiiEntityTypes",
  347    347   
    16,
  348    348   
)
  349    349   
.with_http_header("x-amzn-transcribe-pii-entity-types");
  350    350   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_MODEL_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  351    351   
    ::aws_smithy_schema::ShapeId::from_static(
  352    352   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$LanguageModelName",
  353    353   
        "com.amazonaws.transcribestreaming.synthetic",
  354    354   
        "StartStreamTranscriptionOutput",
  355    355   
    ),
  356    356   
    ::aws_smithy_schema::ShapeType::String,
  357         -
    "language_model_name",
         357  +
    "LanguageModelName",
  358    358   
    17,
  359    359   
)
  360    360   
.with_http_header("x-amzn-transcribe-language-model-name");
  361    361   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  362    362   
    ::aws_smithy_schema::ShapeId::from_static(
  363    363   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$IdentifyLanguage",
  364    364   
        "com.amazonaws.transcribestreaming.synthetic",
  365    365   
        "StartStreamTranscriptionOutput",
  366    366   
    ),
  367    367   
    ::aws_smithy_schema::ShapeType::Boolean,
  368         -
    "identify_language",
         368  +
    "IdentifyLanguage",
  369    369   
    18,
  370    370   
)
  371    371   
.with_http_header("x-amzn-transcribe-identify-language");
  372    372   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_OPTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  373    373   
    ::aws_smithy_schema::ShapeId::from_static(
  374    374   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$LanguageOptions",
  375    375   
        "com.amazonaws.transcribestreaming.synthetic",
  376    376   
        "StartStreamTranscriptionOutput",
  377    377   
    ),
  378    378   
    ::aws_smithy_schema::ShapeType::String,
  379         -
    "language_options",
         379  +
    "LanguageOptions",
  380    380   
    19,
  381    381   
)
  382    382   
.with_http_header("x-amzn-transcribe-language-options");
  383    383   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PREFERRED_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  384    384   
    ::aws_smithy_schema::ShapeId::from_static(
  385    385   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$PreferredLanguage",
  386    386   
        "com.amazonaws.transcribestreaming.synthetic",
  387    387   
        "StartStreamTranscriptionOutput",
  388    388   
    ),
  389    389   
    ::aws_smithy_schema::ShapeType::String,
  390         -
    "preferred_language",
         390  +
    "PreferredLanguage",
  391    391   
    20,
  392    392   
)
  393    393   
.with_http_header("x-amzn-transcribe-preferred-language");
  394    394   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_MULTIPLE_LANGUAGES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  395    395   
    ::aws_smithy_schema::ShapeId::from_static(
  396    396   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$IdentifyMultipleLanguages",
  397    397   
        "com.amazonaws.transcribestreaming.synthetic",
  398    398   
        "StartStreamTranscriptionOutput",
  399    399   
    ),
  400    400   
    ::aws_smithy_schema::ShapeType::Boolean,
  401         -
    "identify_multiple_languages",
         401  +
    "IdentifyMultipleLanguages",
  402    402   
    21,
  403    403   
)
  404    404   
.with_http_header("x-amzn-transcribe-identify-multiple-languages");
  405    405   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  406    406   
    ::aws_smithy_schema::ShapeId::from_static(
  407    407   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$VocabularyNames",
  408    408   
        "com.amazonaws.transcribestreaming.synthetic",
  409    409   
        "StartStreamTranscriptionOutput",
  410    410   
    ),
  411    411   
    ::aws_smithy_schema::ShapeType::String,
  412         -
    "vocabulary_names",
         412  +
    "VocabularyNames",
  413    413   
    22,
  414    414   
)
  415    415   
.with_http_header("x-amzn-transcribe-vocabulary-names");
  416    416   
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  417    417   
    ::aws_smithy_schema::ShapeId::from_static(
  418    418   
        "com.amazonaws.transcribestreaming.synthetic#StartStreamTranscriptionOutput$VocabularyFilterNames",
  419    419   
        "com.amazonaws.transcribestreaming.synthetic",
  420    420   
        "StartStreamTranscriptionOutput",
  421    421   
    ),
  422    422   
    ::aws_smithy_schema::ShapeType::String,
  423         -
    "vocabulary_filter_names",
         423  +
    "VocabularyFilterNames",
  424    424   
    23,
  425    425   
)
  426    426   
.with_http_header("x-amzn-transcribe-vocabulary-filter-names");
         427  +
static STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         428  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         429  +
    ::aws_smithy_schema::ShapeType::String,
         430  +
    "request_id",
         431  +
    24,
         432  +
)
         433  +
.with_http_header("x-amzn-requestid");
  427    434   
static STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  428    435   
    STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA_ID,
  429    436   
    ::aws_smithy_schema::ShapeType::Structure,
  430    437   
    &[
  431    438   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID,
  432    439   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE,
  433    440   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  434    441   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING,
  435    442   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME,
  436    443   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID,
  437    444   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM,
  438    445   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME,
  439    446   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD,
  440    447   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL,
  441    448   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION,
  442    449   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_NUMBER_OF_CHANNELS,
  443    450   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION,
  444    451   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PARTIAL_RESULTS_STABILITY,
  445    452   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
  446    453   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_REDACTION_TYPE,
  447    454   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PII_ENTITY_TYPES,
  448    455   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_MODEL_NAME,
  449    456   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_LANGUAGE,
  450    457   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_OPTIONS,
  451    458   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PREFERRED_LANGUAGE,
  452    459   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_MULTIPLE_LANGUAGES,
  453    460   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES,
  454    461   
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES,
         462  +
        &STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID,
  455    463   
    ],
  456    464   
);
  457    465   
impl StartStreamTranscriptionOutput {
  458    466   
    /// The schema for this shape.
  459    467   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA;
  460    468   
}
  461    469   
impl ::aws_smithy_schema::serde::SerializableStruct for StartStreamTranscriptionOutput {
  462    470   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  463    471   
    fn serialize_members(
  464    472   
        &self,
  465    473   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  466    474   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  467    475   
        if let Some(ref val) = self.request_id {
  468    476   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID, val)?;
  469    477   
        }
  470    478   
        if let Some(ref val) = self.language_code {
  471    479   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  472    480   
        }
  473    481   
        if let Some(ref val) = self.media_sample_rate_hertz {
  474    482   
            ser.write_integer(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  475    483   
        }
  476    484   
        if let Some(ref val) = self.media_encoding {
  477    485   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  478    486   
        }
  479    487   
        if let Some(ref val) = self.vocabulary_name {
  480    488   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME, val)?;
  481    489   
        }
  482    490   
        if let Some(ref val) = self.session_id {
  483    491   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID, val)?;
  484    492   
        }
  485         -
        {
  486         -
            let val = &self.transcript_result_stream;
  487         -
            ser.write_null(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM)?;
  488         -
        }
  489    493   
        if let Some(ref val) = self.vocabulary_filter_name {
  490    494   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME, val)?;
  491    495   
        }
  492    496   
        if let Some(ref val) = self.vocabulary_filter_method {
  493    497   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD, val.as_str())?;
  494    498   
        }
  495    499   
        {
  496    500   
            let val = &self.show_speaker_label;
  497    501   
            ser.write_boolean(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL, *val)?;
  498    502   
        }
@@ -520,524 +668,806 @@
  540    544   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES, val)?;
  541    545   
        }
  542    546   
        if let Some(ref val) = self.vocabulary_filter_names {
  543    547   
            ser.write_string(&STARTSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES, val)?;
  544    548   
        }
  545    549   
        Ok(())
  546    550   
    }
  547    551   
}
  548    552   
impl StartStreamTranscriptionOutput {
  549    553   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  550         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  551         -
        deserializer: &mut D,
         554  +
    pub fn deserialize(
         555  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  552    556   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  553    557   
        #[allow(unused_variables, unused_mut)]
  554    558   
        let mut builder = Self::builder();
  555    559   
        #[allow(
  556    560   
            unused_variables,
  557    561   
            unreachable_code,
  558    562   
            clippy::single_match,
  559    563   
            clippy::match_single_binding,
  560    564   
            clippy::diverging_sub_expression
  561    565   
        )]
  562         -
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, (), |_, member, deser| {
         566  +
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
  563    567   
            match member.member_index() {
  564    568   
                Some(0) => {
  565    569   
                    builder.request_id = Some(deser.read_string(member)?);
  566    570   
                }
  567    571   
                Some(1) => {
  568    572   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  569    573   
                }
  570    574   
                Some(2) => {
  571    575   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  572    576   
                }
  573    577   
                Some(3) => {
  574    578   
                    builder.media_encoding = Some(crate::types::MediaEncoding::from(deser.read_string(member)?.as_str()));
  575    579   
                }
  576    580   
                Some(4) => {
  577    581   
                    builder.vocabulary_name = Some(deser.read_string(member)?);
  578    582   
                }
  579    583   
                Some(5) => {
  580    584   
                    builder.session_id = Some(deser.read_string(member)?);
  581    585   
                }
  582    586   
                Some(6) => {
  583    587   
                    builder.transcript_result_stream = Some({
  584    588   
                        let _ = member;
  585         -
                        todo!("deserialize aggregate")
         589  +
                        todo!("deserialize streaming union")
  586    590   
                    });
  587    591   
                }
  588    592   
                Some(7) => {
  589    593   
                    builder.vocabulary_filter_name = Some(deser.read_string(member)?);
  590    594   
                }
  591    595   
                Some(8) => {
  592    596   
                    builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(deser.read_string(member)?.as_str()));
  593    597   
                }
  594    598   
                Some(9) => {
  595    599   
                    builder.show_speaker_label = Some(deser.read_boolean(member)?);
  596    600   
                }
  597    601   
                Some(10) => {
  598    602   
                    builder.enable_channel_identification = Some(deser.read_boolean(member)?);
  599    603   
                }
  600    604   
                Some(11) => {
  601    605   
                    builder.number_of_channels = Some(deser.read_integer(member)?);
  602    606   
                }
  603    607   
                Some(12) => {
  604    608   
                    builder.enable_partial_results_stabilization = Some(deser.read_boolean(member)?);
  605    609   
                }
  606    610   
                Some(13) => {
  607    611   
                    builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(deser.read_string(member)?.as_str()));
  608    612   
                }
  609    613   
                Some(14) => {
  610    614   
                    builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(deser.read_string(member)?.as_str()));
  611    615   
                }
  612    616   
                Some(15) => {
  613    617   
                    builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(deser.read_string(member)?.as_str()));
  614    618   
                }
  615    619   
                Some(16) => {
  616    620   
                    builder.pii_entity_types = Some(deser.read_string(member)?);
  617    621   
                }
  618    622   
                Some(17) => {
  619    623   
                    builder.language_model_name = Some(deser.read_string(member)?);
  620    624   
                }
  621    625   
                Some(18) => {
  622    626   
                    builder.identify_language = Some(deser.read_boolean(member)?);
  623    627   
                }
  624    628   
                Some(19) => {
  625    629   
                    builder.language_options = Some(deser.read_string(member)?);
  626    630   
                }
  627    631   
                Some(20) => {
  628    632   
                    builder.preferred_language = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  629    633   
                }
  630    634   
                Some(21) => {
  631    635   
                    builder.identify_multiple_languages = Some(deser.read_boolean(member)?);
  632    636   
                }
  633    637   
                Some(22) => {
  634    638   
                    builder.vocabulary_names = Some(deser.read_string(member)?);
  635    639   
                }
  636    640   
                Some(23) => {
  637    641   
                    builder.vocabulary_filter_names = Some(deser.read_string(member)?);
  638    642   
                }
         643  +
                Some(24) => {
         644  +
                    builder._request_id = Some(deser.read_string(member)?);
         645  +
                }
         646  +
                _ => {}
         647  +
            }
         648  +
            Ok(())
         649  +
        })?;
         650  +
        builder
         651  +
            .build()
         652  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         653  +
    }
         654  +
}
         655  +
impl StartStreamTranscriptionOutput {
         656  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         657  +
    /// Header-bound members are read directly from headers, avoiding runtime
         658  +
    /// member iteration overhead. Body members are read via the deserializer.
         659  +
    pub fn deserialize_with_response(
         660  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         661  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         662  +
        _status: u16,
         663  +
        _body: &[u8],
         664  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         665  +
        #[allow(unused_variables, unused_mut)]
         666  +
        let mut builder = Self::builder();
         667  +
        if let Some(val) = headers.get("x-amzn-request-id") {
         668  +
            builder.request_id = Some(val.to_string());
         669  +
        }
         670  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         671  +
            builder.language_code = Some(crate::types::LanguageCode::from(val));
         672  +
        }
         673  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         674  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         675  +
        }
         676  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         677  +
            builder.media_encoding = Some(crate::types::MediaEncoding::from(val));
         678  +
        }
         679  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-name") {
         680  +
            builder.vocabulary_name = Some(val.to_string());
         681  +
        }
         682  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         683  +
            builder.session_id = Some(val.to_string());
         684  +
        }
         685  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-name") {
         686  +
            builder.vocabulary_filter_name = Some(val.to_string());
         687  +
        }
         688  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-method") {
         689  +
            builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(val));
         690  +
        }
         691  +
        if let Some(val) = headers.get("x-amzn-transcribe-show-speaker-label") {
         692  +
            builder.show_speaker_label = val.parse::<bool>().ok();
         693  +
        }
         694  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-channel-identification") {
         695  +
            builder.enable_channel_identification = val.parse::<bool>().ok();
         696  +
        }
         697  +
        if let Some(val) = headers.get("x-amzn-transcribe-number-of-channels") {
         698  +
            builder.number_of_channels = val.parse::<i32>().ok();
         699  +
        }
         700  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-partial-results-stabilization") {
         701  +
            builder.enable_partial_results_stabilization = val.parse::<bool>().ok();
         702  +
        }
         703  +
        if let Some(val) = headers.get("x-amzn-transcribe-partial-results-stability") {
         704  +
            builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(val));
         705  +
        }
         706  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-identification-type") {
         707  +
            builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(val));
         708  +
        }
         709  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-redaction-type") {
         710  +
            builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(val));
         711  +
        }
         712  +
        if let Some(val) = headers.get("x-amzn-transcribe-pii-entity-types") {
         713  +
            builder.pii_entity_types = Some(val.to_string());
         714  +
        }
         715  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-model-name") {
         716  +
            builder.language_model_name = Some(val.to_string());
         717  +
        }
         718  +
        if let Some(val) = headers.get("x-amzn-transcribe-identify-language") {
         719  +
            builder.identify_language = val.parse::<bool>().ok();
         720  +
        }
         721  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-options") {
         722  +
            builder.language_options = Some(val.to_string());
         723  +
        }
         724  +
        if let Some(val) = headers.get("x-amzn-transcribe-preferred-language") {
         725  +
            builder.preferred_language = Some(crate::types::LanguageCode::from(val));
         726  +
        }
         727  +
        if let Some(val) = headers.get("x-amzn-transcribe-identify-multiple-languages") {
         728  +
            builder.identify_multiple_languages = val.parse::<bool>().ok();
         729  +
        }
         730  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-names") {
         731  +
            builder.vocabulary_names = Some(val.to_string());
         732  +
        }
         733  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-names") {
         734  +
            builder.vocabulary_filter_names = Some(val.to_string());
         735  +
        }
         736  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         737  +
            builder._request_id = Some(val.to_string());
         738  +
        }
         739  +
        #[allow(
         740  +
            unused_variables,
         741  +
            unreachable_code,
         742  +
            clippy::single_match,
         743  +
            clippy::match_single_binding,
         744  +
            clippy::diverging_sub_expression
         745  +
        )]
         746  +
        deserializer.read_struct(&STARTSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
         747  +
            match member.member_index() {
         748  +
                Some(0) => { /* read from headers above */ }
         749  +
                Some(1) => { /* read from headers above */ }
         750  +
                Some(2) => { /* read from headers above */ }
         751  +
                Some(3) => { /* read from headers above */ }
         752  +
                Some(4) => { /* read from headers above */ }
         753  +
                Some(5) => { /* read from headers above */ }
         754  +
                Some(6) => {
         755  +
                    builder.transcript_result_stream = Some({
         756  +
                        let _ = member;
         757  +
                        todo!("deserialize streaming union")
         758  +
                    });
         759  +
                }
         760  +
                Some(7) => { /* read from headers above */ }
         761  +
                Some(8) => { /* read from headers above */ }
         762  +
                Some(9) => { /* read from headers above */ }
         763  +
                Some(10) => { /* read from headers above */ }
         764  +
                Some(11) => { /* read from headers above */ }
         765  +
                Some(12) => { /* read from headers above */ }
         766  +
                Some(13) => { /* read from headers above */ }
         767  +
                Some(14) => { /* read from headers above */ }
         768  +
                Some(15) => { /* read from headers above */ }
         769  +
                Some(16) => { /* read from headers above */ }
         770  +
                Some(17) => { /* read from headers above */ }
         771  +
                Some(18) => { /* read from headers above */ }
         772  +
                Some(19) => { /* read from headers above */ }
         773  +
                Some(20) => { /* read from headers above */ }
         774  +
                Some(21) => { /* read from headers above */ }
         775  +
                Some(22) => { /* read from headers above */ }
         776  +
                Some(23) => { /* read from headers above */ }
  639    777   
                _ => {}
  640    778   
            }
  641    779   
            Ok(())
  642    780   
        })?;
  643    781   
        builder
  644    782   
            .build()
  645    783   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  646    784   
    }
  647    785   
}
  648    786   
impl ::aws_types::request_id::RequestId for StartStreamTranscriptionOutput {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde.rs

@@ -1,1 +143,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn parse_http_error_metadata(
           3  +
    _response_status: u16,
           4  +
    response_headers: &::aws_smithy_runtime_api::http::Headers,
           5  +
    response_body: &[u8],
           6  +
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    crate::json_errors::parse_error_metadata(response_body, response_headers)
           8  +
}
           9  +
    2     10   
pub(crate) fn type_erase_result<O, E>(
    3     11   
    result: ::std::result::Result<O, E>,
    4     12   
) -> ::std::result::Result<
    5     13   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6     14   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7     15   
>
    8     16   
where
    9     17   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     18   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     19   
{
   12     20   
    result
   13     21   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     22   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     23   
        .map_err(::std::convert::Into::into)
   16     24   
}
   17     25   
   18         -
pub fn parse_http_error_metadata(
   19         -
    _response_status: u16,
   20         -
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21         -
    response_body: &[u8],
   22         -
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23         -
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24         -
}
   25         -
   26         -
pub(crate) mod shape_get_medical_scribe_stream;
   27         -
   28     26   
pub(crate) mod shape_start_call_analytics_stream_transcription;
   29     27   
   30     28   
pub(crate) mod shape_start_medical_scribe_stream;
   31     29   
   32     30   
pub(crate) mod shape_start_medical_stream_transcription;
   33     31   
   34     32   
pub(crate) mod shape_start_stream_transcription;
   35     33   
   36     34   
pub(crate) mod shape_audio_stream;
   37     35   
   38         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   39         -
    if data.is_empty() {
   40         -
        b"{}"
   41         -
    } else {
   42         -
        data
   43         -
    }
   44         -
}
   45         -
   46         -
pub(crate) mod shape_bad_request_exception;
   47         -
   48         -
pub(crate) mod shape_conflict_exception;
   49         -
   50         -
pub(crate) mod shape_internal_failure_exception;
   51         -
   52         -
pub(crate) mod shape_limit_exceeded_exception;
   53         -
   54     36   
pub(crate) mod shape_medical_scribe_input_stream;
   55     37   
   56         -
pub(crate) mod shape_resource_not_found_exception;
   57         -
   58         -
pub(crate) mod shape_service_unavailable_exception;
   59         -
   60     38   
pub(crate) mod shape_start_call_analytics_stream_transcription_output;
   61     39   
   62     40   
pub(crate) mod shape_start_medical_scribe_stream_output;
   63     41   
   64     42   
pub(crate) mod shape_start_medical_stream_transcription_output;
   65     43   
   66     44   
pub(crate) mod shape_start_stream_transcription_output;
   67     45   
   68     46   
pub fn parse_event_stream_error_metadata(
   69     47   
    payload: &::bytes::Bytes,
   70     48   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   71     49   
    crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
   72     50   
}
   73     51   
   74     52   
pub(crate) mod shape_configuration_event;
   75     53   
   76     54   
pub(crate) mod shape_medical_scribe_configuration_event;
   77     55   
   78     56   
pub(crate) mod shape_medical_scribe_session_control_event;
   79     57   
   80         -
pub(crate) mod shape_medical_scribe_stream_details;
          58  +
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
          59  +
    if data.is_empty() {
          60  +
        b"{}"
          61  +
    } else {
          62  +
        data
          63  +
    }
          64  +
}
          65  +
          66  +
pub(crate) mod shape_bad_request_exception;
   81     67   
   82     68   
pub(crate) mod shape_category_event;
   83     69   
   84     70   
pub(crate) mod shape_channel_definition;
   85     71   
   86         -
pub(crate) mod shape_medical_scribe_channel_definition;
          72  +
pub(crate) mod shape_conflict_exception;
          73  +
          74  +
pub(crate) mod shape_internal_failure_exception;
          75  +
          76  +
pub(crate) mod shape_limit_exceeded_exception;
   87     77   
   88         -
pub(crate) mod shape_medical_scribe_channel_definitions;
          78  +
pub(crate) mod shape_medical_scribe_channel_definition;
   89     79   
   90     80   
pub(crate) mod shape_medical_scribe_context;
   91     81   
   92     82   
pub(crate) mod shape_medical_scribe_encryption_settings;
   93     83   
   94         -
pub(crate) mod shape_medical_scribe_post_stream_analytics_result;
   95         -
   96     84   
pub(crate) mod shape_medical_scribe_post_stream_analytics_settings;
   97     85   
   98     86   
pub(crate) mod shape_medical_scribe_transcript_event;
   99     87   
  100     88   
pub(crate) mod shape_medical_transcript_event;
  101     89   
  102     90   
pub(crate) mod shape_post_call_analytics_settings;
  103     91   
          92  +
pub(crate) mod shape_service_unavailable_exception;
          93  +
  104     94   
pub(crate) mod shape_transcript_event;
  105     95   
  106     96   
pub(crate) mod shape_utterance_event;
  107     97   
  108         -
pub(crate) mod shape_clinical_note_generation_result;
  109         -
  110     98   
pub(crate) mod shape_clinical_note_generation_settings;
  111     99   
  112         -
pub(crate) mod shape_kms_encryption_context_map;
  113         -
  114    100   
pub(crate) mod shape_medical_scribe_patient_context;
  115    101   
  116    102   
pub(crate) mod shape_call_analytics_entity_list;
  117    103   
  118    104   
pub(crate) mod shape_call_analytics_item_list;
  119    105   
  120    106   
pub(crate) mod shape_call_analytics_language_identification;
  121    107   
  122    108   
pub(crate) mod shape_issues_detected;
  123    109   

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde/shape_clinical_note_generation_result.rs

@@ -1,0 +61,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_clinical_note_generation_result<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ClinicalNoteGenerationResult>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::ClinicalNoteGenerationResultBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "ClinicalNoteOutputLocation" => {
   19         -
                            builder = builder.set_clinical_note_output_location(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "TranscriptOutputLocation" => {
   26         -
                            builder = builder.set_transcript_output_location(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "Status" => {
   33         -
                            builder = builder.set_status(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::ClinicalNoteGenerationStatus::from(u.as_ref())))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        "FailureReason" => {
   40         -
                            builder = builder.set_failure_reason(
   41         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   42         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   43         -
                                    .transpose()?,
   44         -
                            );
   45         -
                        }
   46         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   47         -
                    },
   48         -
                    other => {
   49         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   50         -
                            "expected object key or end object, found: {other:?}"
   51         -
                        )))
   52         -
                    }
   53         -
                }
   54         -
            }
   55         -
            Ok(Some(builder.build()))
   56         -
        }
   57         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   58         -
            "expected start object or null",
   59         -
        )),
   60         -
    }
   61         -
}

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde/shape_clinical_note_generation_settings.rs

@@ -1,1 +64,0 @@
    4      4   
    input: &crate::types::ClinicalNoteGenerationSettings,
    5      5   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6      6   
    {
    7      7   
        object.key("OutputBucketName").string(input.output_bucket_name.as_str());
    8      8   
    }
    9      9   
    if let Some(var_1) = &input.note_template {
   10     10   
        object.key("NoteTemplate").string(var_1.as_str());
   11     11   
    }
   12     12   
    Ok(())
   13     13   
}
   14         -
   15         -
pub(crate) fn de_clinical_note_generation_settings<'a, I>(
   16         -
    tokens: &mut ::std::iter::Peekable<I>,
   17         -
    _value: &'a [u8],
   18         -
) -> ::std::result::Result<Option<crate::types::ClinicalNoteGenerationSettings>, ::aws_smithy_json::deserialize::error::DeserializeError>
   19         -
where
   20         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   21         -
{
   22         -
    match tokens.next().transpose()? {
   23         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   24         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   25         -
            #[allow(unused_mut)]
   26         -
            let mut builder = crate::types::builders::ClinicalNoteGenerationSettingsBuilder::default();
   27         -
            loop {
   28         -
                match tokens.next().transpose()? {
   29         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   30         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   31         -
                        "OutputBucketName" => {
   32         -
                            builder = builder.set_output_bucket_name(
   33         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35         -
                                    .transpose()?,
   36         -
                            );
   37         -
                        }
   38         -
                        "NoteTemplate" => {
   39         -
                            builder = builder.set_note_template(
   40         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   41         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MedicalScribeNoteTemplate::from(u.as_ref())))
   42         -
                                    .transpose()?,
   43         -
                            );
   44         -
                        }
   45         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   46         -
                    },
   47         -
                    other => {
   48         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   49         -
                            "expected object key or end object, found: {other:?}"
   50         -
                        )))
   51         -
                    }
   52         -
                }
   53         -
            }
   54         -
            Ok(Some(
   55         -
                crate::serde_util::clinical_note_generation_settings_correct_errors(builder)
   56         -
                    .build()
   57         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   58         -
            ))
   59         -
        }
   60         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   61         -
            "expected start object or null",
   62         -
        )),
   63         -
    }
   64         -
}

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde/shape_get_medical_scribe_stream.rs

@@ -1,0 +144,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_get_medical_scribe_stream_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamOutput,
    9         -
    crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "BadRequestException" => crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::BadRequestException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::BadRequestExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_bad_request_exception::de_bad_request_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                output.build()
   36         -
            };
   37         -
            if tmp.message.is_none() {
   38         -
                tmp.message = _error_message;
   39         -
            }
   40         -
            tmp
   41         -
        }),
   42         -
        "InternalFailureException" => crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::InternalFailureException({
   43         -
            #[allow(unused_mut)]
   44         -
            let mut tmp = {
   45         -
                #[allow(unused_mut)]
   46         -
                let mut output = crate::types::error::builders::InternalFailureExceptionBuilder::default();
   47         -
                output = crate::protocol_serde::shape_internal_failure_exception::de_internal_failure_exception_json_err(_response_body, output)
   48         -
                    .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
   49         -
                let output = output.meta(generic);
   50         -
                output.build()
   51         -
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55         -
            tmp
   56         -
        }),
   57         -
        "LimitExceededException" => crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::LimitExceededException({
   58         -
            #[allow(unused_mut)]
   59         -
            let mut tmp = {
   60         -
                #[allow(unused_mut)]
   61         -
                let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
   62         -
                output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_json_err(_response_body, output)
   63         -
                    .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
   64         -
                let output = output.meta(generic);
   65         -
                output.build()
   66         -
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70         -
            tmp
   71         -
        }),
   72         -
        "ResourceNotFoundException" => crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::ResourceNotFoundException({
   73         -
            #[allow(unused_mut)]
   74         -
            let mut tmp = {
   75         -
                #[allow(unused_mut)]
   76         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   77         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   78         -
                    .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                output.build()
   81         -
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85         -
            tmp
   86         -
        }),
   87         -
        _ => crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::generic(generic),
   88         -
    })
   89         -
}
   90         -
   91         -
#[allow(clippy::unnecessary_wraps)]
   92         -
pub fn de_get_medical_scribe_stream_http_response(
   93         -
    _response_status: u16,
   94         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   95         -
    _response_body: &[u8],
   96         -
) -> std::result::Result<
   97         -
    crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamOutput,
   98         -
    crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError,
   99         -
> {
  100         -
    Ok({
  101         -
        #[allow(unused_mut)]
  102         -
        let mut output = crate::operation::get_medical_scribe_stream::builders::GetMedicalScribeStreamOutputBuilder::default();
  103         -
        output = crate::protocol_serde::shape_get_medical_scribe_stream::de_get_medical_scribe_stream(_response_body, output)
  104         -
            .map_err(crate::operation::get_medical_scribe_stream::GetMedicalScribeStreamError::unhandled)?;
  105         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  106         -
        output.build()
  107         -
    })
  108         -
}
  109         -
  110         -
pub(crate) fn de_get_medical_scribe_stream(
  111         -
    _value: &[u8],
  112         -
    mut builder: crate::operation::get_medical_scribe_stream::builders::GetMedicalScribeStreamOutputBuilder,
  113         -
) -> ::std::result::Result<
  114         -
    crate::operation::get_medical_scribe_stream::builders::GetMedicalScribeStreamOutputBuilder,
  115         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  116         -
> {
  117         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  118         -
    let tokens = &mut tokens_owned;
  119         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  120         -
    loop {
  121         -
        match tokens.next().transpose()? {
  122         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  123         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  124         -
                "MedicalScribeStreamDetails" => {
  125         -
                    builder = builder.set_medical_scribe_stream_details(
  126         -
                        crate::protocol_serde::shape_medical_scribe_stream_details::de_medical_scribe_stream_details(tokens, _value)?,
  127         -
                    );
  128         -
                }
  129         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  130         -
            },
  131         -
            other => {
  132         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  133         -
                    "expected object key or end object, found: {other:?}"
  134         -
                )))
  135         -
            }
  136         -
        }
  137         -
    }
  138         -
    if tokens.next().is_some() {
  139         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  140         -
            "found more JSON tokens after completing parsing",
  141         -
        ));
  142         -
    }
  143         -
    Ok(builder)
  144         -
}

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde/shape_kms_encryption_context_map.rs

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_kms_encryption_context_map<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<
    6         -
    Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    7         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
    8         -
>
    9         -
where
   10         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   11         -
{
   12         -
    match tokens.next().transpose()? {
   13         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15         -
            let mut map = ::std::collections::HashMap::new();
   16         -
            loop {
   17         -
                match tokens.next().transpose()? {
   18         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   22         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   23         -
                            .transpose()?;
   24         -
                        match value {
   25         -
                            Some(value) => {
   26         -
                                map.insert(key, value);
   27         -
                            }
   28         -
                            None => {
   29         -
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   30         -
                                    "dense map cannot contain null values",
   31         -
                                ))
   32         -
                            }
   33         -
                        }
   34         -
                    }
   35         -
                    other => {
   36         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   37         -
                            "expected object key or end object, found: {other:?}"
   38         -
                        )))
   39         -
                    }
   40         -
                }
   41         -
            }
   42         -
            Ok(Some(map))
   43         -
        }
   44         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
            "expected start object or null",
   46         -
        )),
   47         -
    }
   48         -
}

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/protocol_serde/shape_medical_scribe_channel_definition.rs

@@ -1,1 +67,0 @@
    7      7   
        object.key("ChannelId").number(
    8      8   
            #[allow(clippy::useless_conversion)]
    9      9   
            ::aws_smithy_types::Number::NegInt((input.channel_id).into()),
   10     10   
        );
   11     11   
    }
   12     12   
    {
   13     13   
        object.key("ParticipantRole").string(input.participant_role.as_str());
   14     14   
    }
   15     15   
    Ok(())
   16     16   
}
   17         -
   18         -
pub(crate) fn de_medical_scribe_channel_definition<'a, I>(
   19         -
    tokens: &mut ::std::iter::Peekable<I>,
   20         -
    _value: &'a [u8],
   21         -
) -> ::std::result::Result<Option<crate::types::MedicalScribeChannelDefinition>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    match tokens.next().transpose()? {
   26         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   27         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   28         -
            #[allow(unused_mut)]
   29         -
            let mut builder = crate::types::builders::MedicalScribeChannelDefinitionBuilder::default();
   30         -
            loop {
   31         -
                match tokens.next().transpose()? {
   32         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   33         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   34         -
                        "ChannelId" => {
   35         -
                            builder = builder.set_channel_id(
   36         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   37         -
                                    .map(i32::try_from)
   38         -
                                    .transpose()?,
   39         -
                            );
   40         -
                        }
   41         -
                        "ParticipantRole" => {
   42         -
                            builder = builder.set_participant_role(
   43         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   44         -
                                    .map(|s| s.to_unescaped().map(|u| crate::types::MedicalScribeParticipantRole::from(u.as_ref())))
   45         -
                                    .transpose()?,
   46         -
                            );
   47         -
                        }
   48         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   49         -
                    },
   50         -
                    other => {
   51         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   52         -
                            "expected object key or end object, found: {other:?}"
   53         -
                        )))
   54         -
                    }
   55         -
                }
   56         -
            }
   57         -
            Ok(Some(
   58         -
                crate::serde_util::medical_scribe_channel_definition_correct_errors(builder)
   59         -
                    .build()
   60         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   61         -
            ))
   62         -
        }
   63         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   64         -
            "expected start object or null",
   65         -
        )),
   66         -
    }
   67         -
}