AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

@@ -120,120 +591,713 @@
  140    140   
    "com.amazonaws.transcribestreaming.synthetic",
  141    141   
    "StartCallAnalyticsStreamTranscriptionOutput",
  142    142   
);
  143    143   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  144    144   
    ::aws_smithy_schema::ShapeId::from_static(
  145    145   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$RequestId",
  146    146   
        "com.amazonaws.transcribestreaming.synthetic",
  147    147   
        "StartCallAnalyticsStreamTranscriptionOutput",
  148    148   
    ),
  149    149   
    ::aws_smithy_schema::ShapeType::String,
  150         -
    "request_id",
         150  +
    "RequestId",
  151    151   
    0,
  152    152   
)
  153    153   
.with_http_header("x-amzn-request-id");
  154    154   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  155    155   
    ::aws_smithy_schema::ShapeId::from_static(
  156    156   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$LanguageCode",
  157    157   
        "com.amazonaws.transcribestreaming.synthetic",
  158    158   
        "StartCallAnalyticsStreamTranscriptionOutput",
  159    159   
    ),
  160    160   
    ::aws_smithy_schema::ShapeType::String,
  161         -
    "language_code",
         161  +
    "LanguageCode",
  162    162   
    1,
  163    163   
)
  164    164   
.with_http_header("x-amzn-transcribe-language-code");
  165    165   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema =
  166    166   
    ::aws_smithy_schema::Schema::new_member(
  167    167   
        ::aws_smithy_schema::ShapeId::from_static(
  168    168   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$MediaSampleRateHertz",
  169    169   
            "com.amazonaws.transcribestreaming.synthetic",
  170    170   
            "StartCallAnalyticsStreamTranscriptionOutput",
  171    171   
        ),
  172    172   
        ::aws_smithy_schema::ShapeType::Integer,
  173         -
        "media_sample_rate_hertz",
         173  +
        "MediaSampleRateHertz",
  174    174   
        2,
  175    175   
    )
  176    176   
    .with_http_header("x-amzn-transcribe-sample-rate");
  177    177   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  178    178   
    ::aws_smithy_schema::ShapeId::from_static(
  179    179   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$MediaEncoding",
  180    180   
        "com.amazonaws.transcribestreaming.synthetic",
  181    181   
        "StartCallAnalyticsStreamTranscriptionOutput",
  182    182   
    ),
  183    183   
    ::aws_smithy_schema::ShapeType::String,
  184         -
    "media_encoding",
         184  +
    "MediaEncoding",
  185    185   
    3,
  186    186   
)
  187    187   
.with_http_header("x-amzn-transcribe-media-encoding");
  188    188   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$VocabularyName",
  191    191   
        "com.amazonaws.transcribestreaming.synthetic",
  192    192   
        "StartCallAnalyticsStreamTranscriptionOutput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::String,
  195         -
    "vocabulary_name",
         195  +
    "VocabularyName",
  196    196   
    4,
  197    197   
)
  198    198   
.with_http_header("x-amzn-transcribe-vocabulary-name");
  199    199   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  200    200   
    ::aws_smithy_schema::ShapeId::from_static(
  201    201   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$SessionId",
  202    202   
        "com.amazonaws.transcribestreaming.synthetic",
  203    203   
        "StartCallAnalyticsStreamTranscriptionOutput",
  204    204   
    ),
  205    205   
    ::aws_smithy_schema::ShapeType::String,
  206         -
    "session_id",
         206  +
    "SessionId",
  207    207   
    5,
  208    208   
)
  209    209   
.with_http_header("x-amzn-transcribe-session-id");
  210    210   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM: ::aws_smithy_schema::Schema =
  211    211   
    ::aws_smithy_schema::Schema::new_member(
  212    212   
        ::aws_smithy_schema::ShapeId::from_static(
  213    213   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$CallAnalyticsTranscriptResultStream",
  214    214   
            "com.amazonaws.transcribestreaming.synthetic",
  215    215   
            "StartCallAnalyticsStreamTranscriptionOutput",
  216    216   
        ),
  217    217   
        ::aws_smithy_schema::ShapeType::Union,
  218         -
        "call_analytics_transcript_result_stream",
         218  +
        "CallAnalyticsTranscriptResultStream",
  219    219   
        6,
  220    220   
    )
  221    221   
    .with_http_payload();
  222    222   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME: ::aws_smithy_schema::Schema =
  223    223   
    ::aws_smithy_schema::Schema::new_member(
  224    224   
        ::aws_smithy_schema::ShapeId::from_static(
  225    225   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$VocabularyFilterName",
  226    226   
            "com.amazonaws.transcribestreaming.synthetic",
  227    227   
            "StartCallAnalyticsStreamTranscriptionOutput",
  228    228   
        ),
  229    229   
        ::aws_smithy_schema::ShapeType::String,
  230         -
        "vocabulary_filter_name",
         230  +
        "VocabularyFilterName",
  231    231   
        7,
  232    232   
    )
  233    233   
    .with_http_header("x-amzn-transcribe-vocabulary-filter-name");
  234    234   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD: ::aws_smithy_schema::Schema =
  235    235   
    ::aws_smithy_schema::Schema::new_member(
  236    236   
        ::aws_smithy_schema::ShapeId::from_static(
  237    237   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$VocabularyFilterMethod",
  238    238   
            "com.amazonaws.transcribestreaming.synthetic",
  239    239   
            "StartCallAnalyticsStreamTranscriptionOutput",
  240    240   
        ),
  241    241   
        ::aws_smithy_schema::ShapeType::String,
  242         -
        "vocabulary_filter_method",
         242  +
        "VocabularyFilterMethod",
  243    243   
        8,
  244    244   
    )
  245    245   
    .with_http_header("x-amzn-transcribe-vocabulary-filter-method");
  246    246   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_MODEL_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  247    247   
    ::aws_smithy_schema::ShapeId::from_static(
  248    248   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$LanguageModelName",
  249    249   
        "com.amazonaws.transcribestreaming.synthetic",
  250    250   
        "StartCallAnalyticsStreamTranscriptionOutput",
  251    251   
    ),
  252    252   
    ::aws_smithy_schema::ShapeType::String,
  253         -
    "language_model_name",
         253  +
    "LanguageModelName",
  254    254   
    9,
  255    255   
)
  256    256   
.with_http_header("x-amzn-transcribe-language-model-name");
  257    257   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  258    258   
    ::aws_smithy_schema::ShapeId::from_static(
  259    259   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$IdentifyLanguage",
  260    260   
        "com.amazonaws.transcribestreaming.synthetic",
  261    261   
        "StartCallAnalyticsStreamTranscriptionOutput",
  262    262   
    ),
  263    263   
    ::aws_smithy_schema::ShapeType::Boolean,
  264         -
    "identify_language",
         264  +
    "IdentifyLanguage",
  265    265   
    10,
  266    266   
)
  267    267   
.with_http_header("x-amzn-transcribe-identify-language");
  268    268   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_OPTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  269    269   
    ::aws_smithy_schema::ShapeId::from_static(
  270    270   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$LanguageOptions",
  271    271   
        "com.amazonaws.transcribestreaming.synthetic",
  272    272   
        "StartCallAnalyticsStreamTranscriptionOutput",
  273    273   
    ),
  274    274   
    ::aws_smithy_schema::ShapeType::String,
  275         -
    "language_options",
         275  +
    "LanguageOptions",
  276    276   
    11,
  277    277   
)
  278    278   
.with_http_header("x-amzn-transcribe-language-options");
  279    279   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PREFERRED_LANGUAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  280    280   
    ::aws_smithy_schema::ShapeId::from_static(
  281    281   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$PreferredLanguage",
  282    282   
        "com.amazonaws.transcribestreaming.synthetic",
  283    283   
        "StartCallAnalyticsStreamTranscriptionOutput",
  284    284   
    ),
  285    285   
    ::aws_smithy_schema::ShapeType::String,
  286         -
    "preferred_language",
         286  +
    "PreferredLanguage",
  287    287   
    12,
  288    288   
)
  289    289   
.with_http_header("x-amzn-transcribe-preferred-language");
  290    290   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  291    291   
    ::aws_smithy_schema::ShapeId::from_static(
  292    292   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$VocabularyNames",
  293    293   
        "com.amazonaws.transcribestreaming.synthetic",
  294    294   
        "StartCallAnalyticsStreamTranscriptionOutput",
  295    295   
    ),
  296    296   
    ::aws_smithy_schema::ShapeType::String,
  297         -
    "vocabulary_names",
         297  +
    "VocabularyNames",
  298    298   
    13,
  299    299   
)
  300    300   
.with_http_header("x-amzn-transcribe-vocabulary-names");
  301    301   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES: ::aws_smithy_schema::Schema =
  302    302   
    ::aws_smithy_schema::Schema::new_member(
  303    303   
        ::aws_smithy_schema::ShapeId::from_static(
  304    304   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$VocabularyFilterNames",
  305    305   
            "com.amazonaws.transcribestreaming.synthetic",
  306    306   
            "StartCallAnalyticsStreamTranscriptionOutput",
  307    307   
        ),
  308    308   
        ::aws_smithy_schema::ShapeType::String,
  309         -
        "vocabulary_filter_names",
         309  +
        "VocabularyFilterNames",
  310    310   
        14,
  311    311   
    )
  312    312   
    .with_http_header("x-amzn-transcribe-vocabulary-filter-names");
  313    313   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION: ::aws_smithy_schema::Schema =
  314    314   
    ::aws_smithy_schema::Schema::new_member(
  315    315   
        ::aws_smithy_schema::ShapeId::from_static(
  316    316   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$EnablePartialResultsStabilization",
  317    317   
            "com.amazonaws.transcribestreaming.synthetic",
  318    318   
            "StartCallAnalyticsStreamTranscriptionOutput",
  319    319   
        ),
  320    320   
        ::aws_smithy_schema::ShapeType::Boolean,
  321         -
        "enable_partial_results_stabilization",
         321  +
        "EnablePartialResultsStabilization",
  322    322   
        15,
  323    323   
    )
  324    324   
    .with_http_header("x-amzn-transcribe-enable-partial-results-stabilization");
  325    325   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PARTIAL_RESULTS_STABILITY: ::aws_smithy_schema::Schema =
  326    326   
    ::aws_smithy_schema::Schema::new_member(
  327    327   
        ::aws_smithy_schema::ShapeId::from_static(
  328    328   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$PartialResultsStability",
  329    329   
            "com.amazonaws.transcribestreaming.synthetic",
  330    330   
            "StartCallAnalyticsStreamTranscriptionOutput",
  331    331   
        ),
  332    332   
        ::aws_smithy_schema::ShapeType::String,
  333         -
        "partial_results_stability",
         333  +
        "PartialResultsStability",
  334    334   
        16,
  335    335   
    )
  336    336   
    .with_http_header("x-amzn-transcribe-partial-results-stability");
  337    337   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE: ::aws_smithy_schema::Schema =
  338    338   
    ::aws_smithy_schema::Schema::new_member(
  339    339   
        ::aws_smithy_schema::ShapeId::from_static(
  340    340   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$ContentIdentificationType",
  341    341   
            "com.amazonaws.transcribestreaming.synthetic",
  342    342   
            "StartCallAnalyticsStreamTranscriptionOutput",
  343    343   
        ),
  344    344   
        ::aws_smithy_schema::ShapeType::String,
  345         -
        "content_identification_type",
         345  +
        "ContentIdentificationType",
  346    346   
        17,
  347    347   
    )
  348    348   
    .with_http_header("x-amzn-transcribe-content-identification-type");
  349    349   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_REDACTION_TYPE: ::aws_smithy_schema::Schema =
  350    350   
    ::aws_smithy_schema::Schema::new_member(
  351    351   
        ::aws_smithy_schema::ShapeId::from_static(
  352    352   
            "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$ContentRedactionType",
  353    353   
            "com.amazonaws.transcribestreaming.synthetic",
  354    354   
            "StartCallAnalyticsStreamTranscriptionOutput",
  355    355   
        ),
  356    356   
        ::aws_smithy_schema::ShapeType::String,
  357         -
        "content_redaction_type",
         357  +
        "ContentRedactionType",
  358    358   
        18,
  359    359   
    )
  360    360   
    .with_http_header("x-amzn-transcribe-content-redaction-type");
  361    361   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PII_ENTITY_TYPES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  362    362   
    ::aws_smithy_schema::ShapeId::from_static(
  363    363   
        "com.amazonaws.transcribestreaming.synthetic#StartCallAnalyticsStreamTranscriptionOutput$PiiEntityTypes",
  364    364   
        "com.amazonaws.transcribestreaming.synthetic",
  365    365   
        "StartCallAnalyticsStreamTranscriptionOutput",
  366    366   
    ),
  367    367   
    ::aws_smithy_schema::ShapeType::String,
  368         -
    "pii_entity_types",
         368  +
    "PiiEntityTypes",
  369    369   
    19,
  370    370   
)
  371    371   
.with_http_header("x-amzn-transcribe-pii-entity-types");
         372  +
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         373  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         374  +
    ::aws_smithy_schema::ShapeType::String,
         375  +
    "request_id",
         376  +
    20,
         377  +
)
         378  +
.with_http_header("x-amzn-requestid");
  372    379   
static STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  373    380   
    STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA_ID,
  374    381   
    ::aws_smithy_schema::ShapeType::Structure,
  375    382   
    &[
  376    383   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID,
  377    384   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE,
  378    385   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  379    386   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING,
  380    387   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME,
  381    388   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID,
  382    389   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM,
  383    390   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME,
  384    391   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD,
  385    392   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_MODEL_NAME,
  386    393   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_LANGUAGE,
  387    394   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_OPTIONS,
  388    395   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PREFERRED_LANGUAGE,
  389    396   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES,
  390    397   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES,
  391    398   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION,
  392    399   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PARTIAL_RESULTS_STABILITY,
  393    400   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
  394    401   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_REDACTION_TYPE,
  395    402   
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PII_ENTITY_TYPES,
         403  +
        &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID,
  396    404   
    ],
  397    405   
);
  398    406   
impl StartCallAnalyticsStreamTranscriptionOutput {
  399    407   
    /// The schema for this shape.
  400    408   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA;
  401    409   
}
  402    410   
impl ::aws_smithy_schema::serde::SerializableStruct for StartCallAnalyticsStreamTranscriptionOutput {
  403    411   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  404    412   
    fn serialize_members(
  405    413   
        &self,
  406    414   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  407    415   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  408    416   
        if let Some(ref val) = self.request_id {
  409    417   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID, val)?;
  410    418   
        }
  411    419   
        if let Some(ref val) = self.language_code {
  412    420   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  413    421   
        }
  414    422   
        if let Some(ref val) = self.media_sample_rate_hertz {
  415    423   
            ser.write_integer(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  416    424   
        }
  417    425   
        if let Some(ref val) = self.media_encoding {
  418    426   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  419    427   
        }
  420    428   
        if let Some(ref val) = self.vocabulary_name {
  421    429   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME, val)?;
  422    430   
        }
  423    431   
        if let Some(ref val) = self.session_id {
  424    432   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID, val)?;
  425    433   
        }
  426         -
        {
  427         -
            let val = &self.call_analytics_transcript_result_stream;
  428         -
            ser.write_null(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM)?;
  429         -
        }
  430    434   
        if let Some(ref val) = self.vocabulary_filter_name {
  431    435   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAME, val)?;
  432    436   
        }
  433    437   
        if let Some(ref val) = self.vocabulary_filter_method {
  434    438   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_METHOD, val.as_str())?;
  435    439   
        }
  436    440   
        if let Some(ref val) = self.language_model_name {
  437    441   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_MODEL_NAME, val)?;
  438    442   
        }
  439    443   
        {
  440    444   
            let val = &self.identify_language;
  441    445   
            ser.write_boolean(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_IDENTIFY_LANGUAGE, *val)?;
  442    446   
        }
  443    447   
        if let Some(ref val) = self.language_options {
  444    448   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_OPTIONS, val)?;
  445    449   
        }
  446    450   
        if let Some(ref val) = self.preferred_language {
  447    451   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PREFERRED_LANGUAGE, val.as_str())?;
  448    452   
        }
  449    453   
        if let Some(ref val) = self.vocabulary_names {
  450    454   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAMES, val)?;
  451    455   
        }
  452    456   
        if let Some(ref val) = self.vocabulary_filter_names {
  453    457   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_FILTER_NAMES, val)?;
  454    458   
        }
  455    459   
        {
  456    460   
            let val = &self.enable_partial_results_stabilization;
  457    461   
            ser.write_boolean(
  458    462   
                &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_PARTIAL_RESULTS_STABILIZATION,
  459    463   
                *val,
  460    464   
            )?;
  461    465   
        }
  462    466   
        if let Some(ref val) = self.partial_results_stability {
  463    467   
            ser.write_string(
  464    468   
                &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PARTIAL_RESULTS_STABILITY,
  465    469   
                val.as_str(),
  466    470   
            )?;
  467    471   
        }
  468    472   
        if let Some(ref val) = self.content_identification_type {
  469    473   
            ser.write_string(
  470    474   
                &STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
  471    475   
                val.as_str(),
  472    476   
            )?;
  473    477   
        }
  474    478   
        if let Some(ref val) = self.content_redaction_type {
  475    479   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_REDACTION_TYPE, val.as_str())?;
  476    480   
        }
  477    481   
        if let Some(ref val) = self.pii_entity_types {
  478    482   
            ser.write_string(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_MEMBER_PII_ENTITY_TYPES, val)?;
  479    483   
        }
  480    484   
        Ok(())
  481    485   
    }
  482    486   
}
  483    487   
impl StartCallAnalyticsStreamTranscriptionOutput {
  484    488   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  485         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  486         -
        deserializer: &mut D,
         489  +
    pub fn deserialize(
         490  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  487    491   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  488    492   
        #[allow(unused_variables, unused_mut)]
  489    493   
        let mut builder = Self::builder();
  490    494   
        #[allow(
  491    495   
            unused_variables,
  492    496   
            unreachable_code,
  493    497   
            clippy::single_match,
  494    498   
            clippy::match_single_binding,
  495    499   
            clippy::diverging_sub_expression
  496    500   
        )]
  497         -
        deserializer.read_struct(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, (), |_, member, deser| {
         501  +
        deserializer.read_struct(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
  498    502   
            match member.member_index() {
  499    503   
                Some(0) => {
  500    504   
                    builder.request_id = Some(deser.read_string(member)?);
  501    505   
                }
  502    506   
                Some(1) => {
  503    507   
                    builder.language_code = Some(crate::types::CallAnalyticsLanguageCode::from(deser.read_string(member)?.as_str()));
  504    508   
                }
  505    509   
                Some(2) => {
  506    510   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  507    511   
                }
  508    512   
                Some(3) => {
  509    513   
                    builder.media_encoding = Some(crate::types::MediaEncoding::from(deser.read_string(member)?.as_str()));
  510    514   
                }
  511    515   
                Some(4) => {
  512    516   
                    builder.vocabulary_name = Some(deser.read_string(member)?);
  513    517   
                }
  514    518   
                Some(5) => {
  515    519   
                    builder.session_id = Some(deser.read_string(member)?);
  516    520   
                }
  517    521   
                Some(6) => {
  518    522   
                    builder.call_analytics_transcript_result_stream = Some({
  519    523   
                        let _ = member;
  520         -
                        todo!("deserialize aggregate")
         524  +
                        todo!("deserialize streaming union")
  521    525   
                    });
  522    526   
                }
  523    527   
                Some(7) => {
  524    528   
                    builder.vocabulary_filter_name = Some(deser.read_string(member)?);
  525    529   
                }
  526    530   
                Some(8) => {
  527    531   
                    builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(deser.read_string(member)?.as_str()));
  528    532   
                }
  529    533   
                Some(9) => {
  530    534   
                    builder.language_model_name = Some(deser.read_string(member)?);
  531    535   
                }
  532    536   
                Some(10) => {
  533    537   
                    builder.identify_language = Some(deser.read_boolean(member)?);
  534    538   
                }
  535    539   
                Some(11) => {
  536    540   
                    builder.language_options = Some(deser.read_string(member)?);
  537    541   
                }
  538    542   
                Some(12) => {
  539    543   
                    builder.preferred_language = Some(crate::types::CallAnalyticsLanguageCode::from(deser.read_string(member)?.as_str()));
  540    544   
                }
  541    545   
                Some(13) => {
  542    546   
                    builder.vocabulary_names = Some(deser.read_string(member)?);
  543    547   
                }
  544    548   
                Some(14) => {
  545    549   
                    builder.vocabulary_filter_names = Some(deser.read_string(member)?);
  546    550   
                }
  547    551   
                Some(15) => {
  548    552   
                    builder.enable_partial_results_stabilization = Some(deser.read_boolean(member)?);
  549    553   
                }
  550    554   
                Some(16) => {
  551    555   
                    builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(deser.read_string(member)?.as_str()));
  552    556   
                }
  553    557   
                Some(17) => {
  554    558   
                    builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(deser.read_string(member)?.as_str()));
  555    559   
                }
  556    560   
                Some(18) => {
  557    561   
                    builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(deser.read_string(member)?.as_str()));
  558    562   
                }
  559    563   
                Some(19) => {
  560    564   
                    builder.pii_entity_types = Some(deser.read_string(member)?);
  561    565   
                }
         566  +
                Some(20) => {
         567  +
                    builder._request_id = Some(deser.read_string(member)?);
         568  +
                }
         569  +
                _ => {}
         570  +
            }
         571  +
            Ok(())
         572  +
        })?;
         573  +
        builder
         574  +
            .build()
         575  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         576  +
    }
         577  +
}
         578  +
impl StartCallAnalyticsStreamTranscriptionOutput {
         579  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         580  +
    /// Header-bound members are read directly from headers, avoiding runtime
         581  +
    /// member iteration overhead. Body members are read via the deserializer.
         582  +
    pub fn deserialize_with_response(
         583  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         584  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         585  +
        _status: u16,
         586  +
        _body: &[u8],
         587  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         588  +
        #[allow(unused_variables, unused_mut)]
         589  +
        let mut builder = Self::builder();
         590  +
        if let Some(val) = headers.get("x-amzn-request-id") {
         591  +
            builder.request_id = Some(val.to_string());
         592  +
        }
         593  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         594  +
            builder.language_code = Some(crate::types::CallAnalyticsLanguageCode::from(val));
         595  +
        }
         596  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         597  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         598  +
        }
         599  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         600  +
            builder.media_encoding = Some(crate::types::MediaEncoding::from(val));
         601  +
        }
         602  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-name") {
         603  +
            builder.vocabulary_name = Some(val.to_string());
         604  +
        }
         605  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         606  +
            builder.session_id = Some(val.to_string());
         607  +
        }
         608  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-name") {
         609  +
            builder.vocabulary_filter_name = Some(val.to_string());
         610  +
        }
         611  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-method") {
         612  +
            builder.vocabulary_filter_method = Some(crate::types::VocabularyFilterMethod::from(val));
         613  +
        }
         614  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-model-name") {
         615  +
            builder.language_model_name = Some(val.to_string());
         616  +
        }
         617  +
        if let Some(val) = headers.get("x-amzn-transcribe-identify-language") {
         618  +
            builder.identify_language = val.parse::<bool>().ok();
         619  +
        }
         620  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-options") {
         621  +
            builder.language_options = Some(val.to_string());
         622  +
        }
         623  +
        if let Some(val) = headers.get("x-amzn-transcribe-preferred-language") {
         624  +
            builder.preferred_language = Some(crate::types::CallAnalyticsLanguageCode::from(val));
         625  +
        }
         626  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-names") {
         627  +
            builder.vocabulary_names = Some(val.to_string());
         628  +
        }
         629  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-filter-names") {
         630  +
            builder.vocabulary_filter_names = Some(val.to_string());
         631  +
        }
         632  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-partial-results-stabilization") {
         633  +
            builder.enable_partial_results_stabilization = val.parse::<bool>().ok();
         634  +
        }
         635  +
        if let Some(val) = headers.get("x-amzn-transcribe-partial-results-stability") {
         636  +
            builder.partial_results_stability = Some(crate::types::PartialResultsStability::from(val));
         637  +
        }
         638  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-identification-type") {
         639  +
            builder.content_identification_type = Some(crate::types::ContentIdentificationType::from(val));
         640  +
        }
         641  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-redaction-type") {
         642  +
            builder.content_redaction_type = Some(crate::types::ContentRedactionType::from(val));
         643  +
        }
         644  +
        if let Some(val) = headers.get("x-amzn-transcribe-pii-entity-types") {
         645  +
            builder.pii_entity_types = Some(val.to_string());
         646  +
        }
         647  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         648  +
            builder._request_id = Some(val.to_string());
         649  +
        }
         650  +
        #[allow(
         651  +
            unused_variables,
         652  +
            unreachable_code,
         653  +
            clippy::single_match,
         654  +
            clippy::match_single_binding,
         655  +
            clippy::diverging_sub_expression
         656  +
        )]
         657  +
        deserializer.read_struct(&STARTCALLANALYTICSSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
         658  +
            match member.member_index() {
         659  +
                Some(0) => { /* read from headers above */ }
         660  +
                Some(1) => { /* read from headers above */ }
         661  +
                Some(2) => { /* read from headers above */ }
         662  +
                Some(3) => { /* read from headers above */ }
         663  +
                Some(4) => { /* read from headers above */ }
         664  +
                Some(5) => { /* read from headers above */ }
         665  +
                Some(6) => {
         666  +
                    builder.call_analytics_transcript_result_stream = Some({
         667  +
                        let _ = member;
         668  +
                        todo!("deserialize streaming union")
         669  +
                    });
         670  +
                }
         671  +
                Some(7) => { /* read from headers above */ }
         672  +
                Some(8) => { /* read from headers above */ }
         673  +
                Some(9) => { /* read from headers above */ }
         674  +
                Some(10) => { /* read from headers above */ }
         675  +
                Some(11) => { /* read from headers above */ }
         676  +
                Some(12) => { /* read from headers above */ }
         677  +
                Some(13) => { /* read from headers above */ }
         678  +
                Some(14) => { /* read from headers above */ }
         679  +
                Some(15) => { /* read from headers above */ }
         680  +
                Some(16) => { /* read from headers above */ }
         681  +
                Some(17) => { /* read from headers above */ }
         682  +
                Some(18) => { /* read from headers above */ }
         683  +
                Some(19) => { /* read from headers above */ }
  562    684   
                _ => {}
  563    685   
            }
  564    686   
            Ok(())
  565    687   
        })?;
  566    688   
        builder
  567    689   
            .build()
  568    690   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  569    691   
    }
  570    692   
}
  571    693   
impl ::aws_types::request_id::RequestId for StartCallAnalyticsStreamTranscriptionOutput {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_medical_scribe_stream.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 `StartMedicalScribeStream`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StartMedicalScribeStream;
    6      6   
impl StartMedicalScribeStream {
    7      7   
    /// Creates a new `StartMedicalScribeStream`
    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_medical_scribe_stream::StartMedicalScribeStreamInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamOutput::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_medical_scribe_stream::StartMedicalScribeStreamInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -143,149 +271,399 @@
  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_medical_scribe_stream::de_start_medical_scribe_stream_http_response(response),
  167    173   
        ))
  168    174   
    }
  169    175   
  170    176   
    fn deserialize_nonstreaming(
  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_medical_scribe_stream::de_start_medical_scribe_stream_http_error(
  178         -
                response.status().as_u16(),
         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_medical_scribe_stream::StartMedicalScribeStreamError::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_medical_scribe_stream::StartMedicalScribeStreamError::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,
  179    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_medical_scribe_stream::StartMedicalScribeStreamError::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_medical_scribe_stream::StartMedicalScribeStreamError::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_medical_scribe_stream::StartMedicalScribeStreamError::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(),
  180    286   
                            body,
  181         -
            ),
  182    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_medical_scribe_stream::StartMedicalScribeStreamError::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_medical_scribe_stream::StartMedicalScribeStreamError::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 StartMedicalScribeStreamRequestSerializer;
  187    337   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartMedicalScribeStreamRequestSerializer {
  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_medical_scribe_stream::StartMedicalScribeStreamInput>()
  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_medical_scribe_stream::StartMedicalScribeStreamInput,
  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, "/medical-scribe-stream").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_medical_scribe_stream::StartMedicalScribeStreamInput,
  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_medical_scribe_stream::ser_start_medical_scribe_stream_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, StartMedicalScribeStream::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::MedicalScribeInputStreamErrorMarshaller::new();
  228    355   
            let marshaller = crate::event_stream_serde::MedicalScribeInputStreamMarshaller::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.input_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 StartMedicalScribeStreamEndpointParamsInterceptor;
  246    374   
  247    375   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartMedicalScribeStreamEndpointParamsInterceptor {
  248    376   
    fn name(&self) -> &'static str {
  249    377   
        "StartMedicalScribeStreamEndpointParamsInterceptor"
  250    378   
    }
  251    379   

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

@@ -49,49 +228,278 @@
   69     69   
    "com.amazonaws.transcribestreaming.synthetic",
   70     70   
    "StartMedicalScribeStreamInput",
   71     71   
);
   72     72   
static STARTMEDICALSCRIBESTREAMINPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamInput$SessionId",
   75     75   
        "com.amazonaws.transcribestreaming.synthetic",
   76     76   
        "StartMedicalScribeStreamInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "session_id",
          79  +
    "SessionId",
   80     80   
    0,
   81     81   
)
   82     82   
.with_http_header("x-amzn-transcribe-session-id");
   83     83   
static STARTMEDICALSCRIBESTREAMINPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamInput$LanguageCode",
   86     86   
        "com.amazonaws.transcribestreaming.synthetic",
   87     87   
        "StartMedicalScribeStreamInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::String,
   90         -
    "language_code",
          90  +
    "LanguageCode",
   91     91   
    1,
   92     92   
)
   93     93   
.with_http_header("x-amzn-transcribe-language-code");
   94     94   
static STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamInput$MediaSampleRateHertz",
   97     97   
        "com.amazonaws.transcribestreaming.synthetic",
   98     98   
        "StartMedicalScribeStreamInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::Integer,
  101         -
    "media_sample_rate_hertz",
         101  +
    "MediaSampleRateHertz",
  102    102   
    2,
  103    103   
)
  104    104   
.with_http_header("x-amzn-transcribe-sample-rate");
  105    105   
static STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamInput$MediaEncoding",
  108    108   
        "com.amazonaws.transcribestreaming.synthetic",
  109    109   
        "StartMedicalScribeStreamInput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::String,
  112         -
    "media_encoding",
         112  +
    "MediaEncoding",
  113    113   
    3,
  114    114   
)
  115    115   
.with_http_header("x-amzn-transcribe-media-encoding");
  116    116   
static STARTMEDICALSCRIBESTREAMINPUT_MEMBER_INPUT_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  117    117   
    ::aws_smithy_schema::ShapeId::from_static(
  118    118   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamInput$InputStream",
  119    119   
        "com.amazonaws.transcribestreaming.synthetic",
  120    120   
        "StartMedicalScribeStreamInput",
  121    121   
    ),
  122    122   
    ::aws_smithy_schema::ShapeType::Union,
  123         -
    "input_stream",
         123  +
    "InputStream",
  124    124   
    4,
  125    125   
)
  126    126   
.with_http_payload();
  127    127   
static STARTMEDICALSCRIBESTREAMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  128    128   
    STARTMEDICALSCRIBESTREAMINPUT_SCHEMA_ID,
  129    129   
    ::aws_smithy_schema::ShapeType::Structure,
  130    130   
    &[
  131    131   
        &STARTMEDICALSCRIBESTREAMINPUT_MEMBER_SESSION_ID,
  132    132   
        &STARTMEDICALSCRIBESTREAMINPUT_MEMBER_LANGUAGE_CODE,
  133    133   
        &STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  134    134   
        &STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_ENCODING,
  135    135   
        &STARTMEDICALSCRIBESTREAMINPUT_MEMBER_INPUT_STREAM,
  136    136   
    ],
  137         -
);
         137  +
)
         138  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/medical-scribe-stream", None));
  138    139   
impl StartMedicalScribeStreamInput {
  139    140   
    /// The schema for this shape.
  140    141   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTMEDICALSCRIBESTREAMINPUT_SCHEMA;
  141    142   
}
  142    143   
impl ::aws_smithy_schema::serde::SerializableStruct for StartMedicalScribeStreamInput {
  143    144   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  144    145   
    fn serialize_members(
  145    146   
        &self,
  146    147   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  147    148   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  148    149   
        if let Some(ref val) = self.session_id {
  149    150   
            ser.write_string(&STARTMEDICALSCRIBESTREAMINPUT_MEMBER_SESSION_ID, val)?;
  150    151   
        }
  151    152   
        if let Some(ref val) = self.language_code {
  152    153   
            ser.write_string(&STARTMEDICALSCRIBESTREAMINPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  153    154   
        }
  154    155   
        if let Some(ref val) = self.media_sample_rate_hertz {
  155    156   
            ser.write_integer(&STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  156    157   
        }
  157    158   
        if let Some(ref val) = self.media_encoding {
  158    159   
            ser.write_string(&STARTMEDICALSCRIBESTREAMINPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  159    160   
        }
  160         -
        {
  161         -
            let val = &self.input_stream;
  162         -
            ser.write_null(&STARTMEDICALSCRIBESTREAMINPUT_MEMBER_INPUT_STREAM)?;
  163         -
        }
  164    161   
        Ok(())
  165    162   
    }
  166    163   
}
  167    164   
impl StartMedicalScribeStreamInput {
  168    165   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  169         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  170         -
        deserializer: &mut D,
         166  +
    pub fn deserialize(
         167  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  171    168   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  172    169   
        #[allow(unused_variables, unused_mut)]
  173    170   
        let mut builder = Self::builder();
  174    171   
        #[allow(
  175    172   
            unused_variables,
  176    173   
            unreachable_code,
  177    174   
            clippy::single_match,
  178    175   
            clippy::match_single_binding,
  179    176   
            clippy::diverging_sub_expression
  180    177   
        )]
  181         -
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMINPUT_SCHEMA, (), |_, member, deser| {
         178  +
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMINPUT_SCHEMA, &mut |member, deser| {
  182    179   
            match member.member_index() {
  183    180   
                Some(0) => {
  184    181   
                    builder.session_id = Some(deser.read_string(member)?);
  185    182   
                }
  186    183   
                Some(1) => {
  187    184   
                    builder.language_code = Some(crate::types::MedicalScribeLanguageCode::from(deser.read_string(member)?.as_str()));
  188    185   
                }
  189    186   
                Some(2) => {
  190    187   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  191    188   
                }
  192    189   
                Some(3) => {
  193    190   
                    builder.media_encoding = Some(crate::types::MedicalScribeMediaEncoding::from(deser.read_string(member)?.as_str()));
  194    191   
                }
  195    192   
                Some(4) => {
  196    193   
                    builder.input_stream = Some({
  197    194   
                        let _ = member;
  198         -
                        todo!("deserialize aggregate")
         195  +
                        todo!("deserialize streaming union")
         196  +
                    });
         197  +
                }
         198  +
                _ => {}
         199  +
            }
         200  +
            Ok(())
         201  +
        })?;
         202  +
        builder.media_sample_rate_hertz = builder.media_sample_rate_hertz.or(Some(0i32));
         203  +
        builder
         204  +
            .build()
         205  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         206  +
    }
         207  +
}
         208  +
impl StartMedicalScribeStreamInput {
         209  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         210  +
    /// Header-bound members are read directly from headers, avoiding runtime
         211  +
    /// member iteration overhead. Body members are read via the deserializer.
         212  +
    pub fn deserialize_with_response(
         213  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         214  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         215  +
        _status: u16,
         216  +
        _body: &[u8],
         217  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         218  +
        #[allow(unused_variables, unused_mut)]
         219  +
        let mut builder = Self::builder();
         220  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         221  +
            builder.session_id = Some(val.to_string());
         222  +
        }
         223  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         224  +
            builder.language_code = Some(crate::types::MedicalScribeLanguageCode::from(val));
         225  +
        }
         226  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         227  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         228  +
        }
         229  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         230  +
            builder.media_encoding = Some(crate::types::MedicalScribeMediaEncoding::from(val));
         231  +
        }
         232  +
        #[allow(
         233  +
            unused_variables,
         234  +
            unreachable_code,
         235  +
            clippy::single_match,
         236  +
            clippy::match_single_binding,
         237  +
            clippy::diverging_sub_expression
         238  +
        )]
         239  +
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMINPUT_SCHEMA, &mut |member, deser| {
         240  +
            match member.member_index() {
         241  +
                Some(0) => { /* read from headers above */ }
         242  +
                Some(1) => { /* read from headers above */ }
         243  +
                Some(2) => { /* read from headers above */ }
         244  +
                Some(3) => { /* read from headers above */ }
         245  +
                Some(4) => {
         246  +
                    builder.input_stream = Some({
         247  +
                        let _ = member;
         248  +
                        todo!("deserialize streaming union")
  199    249   
                    });
  200    250   
                }
  201    251   
                _ => {}
  202    252   
            }
  203    253   
            Ok(())
  204    254   
        })?;
  205    255   
        builder
  206    256   
            .build()
  207    257   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  208    258   
    }

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

@@ -33,33 +230,296 @@
   53     53   
    "com.amazonaws.transcribestreaming.synthetic",
   54     54   
    "StartMedicalScribeStreamOutput",
   55     55   
);
   56     56   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$SessionId",
   59     59   
        "com.amazonaws.transcribestreaming.synthetic",
   60     60   
        "StartMedicalScribeStreamOutput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "session_id",
          63  +
    "SessionId",
   64     64   
    0,
   65     65   
)
   66     66   
.with_http_header("x-amzn-transcribe-session-id");
   67     67   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   68     68   
    ::aws_smithy_schema::ShapeId::from_static(
   69     69   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$RequestId",
   70     70   
        "com.amazonaws.transcribestreaming.synthetic",
   71     71   
        "StartMedicalScribeStreamOutput",
   72     72   
    ),
   73     73   
    ::aws_smithy_schema::ShapeType::String,
   74         -
    "request_id",
          74  +
    "RequestId",
   75     75   
    1,
   76     76   
)
   77     77   
.with_http_header("x-amzn-request-id");
   78     78   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$LanguageCode",
   81     81   
        "com.amazonaws.transcribestreaming.synthetic",
   82     82   
        "StartMedicalScribeStreamOutput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "language_code",
          85  +
    "LanguageCode",
   86     86   
    2,
   87     87   
)
   88     88   
.with_http_header("x-amzn-transcribe-language-code");
   89     89   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     90   
    ::aws_smithy_schema::ShapeId::from_static(
   91     91   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$MediaSampleRateHertz",
   92     92   
        "com.amazonaws.transcribestreaming.synthetic",
   93     93   
        "StartMedicalScribeStreamOutput",
   94     94   
    ),
   95     95   
    ::aws_smithy_schema::ShapeType::Integer,
   96         -
    "media_sample_rate_hertz",
          96  +
    "MediaSampleRateHertz",
   97     97   
    3,
   98     98   
)
   99     99   
.with_http_header("x-amzn-transcribe-sample-rate");
  100    100   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$MediaEncoding",
  103    103   
        "com.amazonaws.transcribestreaming.synthetic",
  104    104   
        "StartMedicalScribeStreamOutput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "media_encoding",
         107  +
    "MediaEncoding",
  108    108   
    4,
  109    109   
)
  110    110   
.with_http_header("x-amzn-transcribe-media-encoding");
  111    111   
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_RESULT_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  112    112   
    ::aws_smithy_schema::ShapeId::from_static(
  113    113   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalScribeStreamOutput$ResultStream",
  114    114   
        "com.amazonaws.transcribestreaming.synthetic",
  115    115   
        "StartMedicalScribeStreamOutput",
  116    116   
    ),
  117    117   
    ::aws_smithy_schema::ShapeType::Union,
  118         -
    "result_stream",
         118  +
    "ResultStream",
  119    119   
    5,
  120    120   
)
  121    121   
.with_http_payload();
         122  +
static STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         123  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         124  +
    ::aws_smithy_schema::ShapeType::String,
         125  +
    "request_id",
         126  +
    6,
         127  +
)
         128  +
.with_http_header("x-amzn-requestid");
  122    129   
static STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  123    130   
    STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA_ID,
  124    131   
    ::aws_smithy_schema::ShapeType::Structure,
  125    132   
    &[
  126    133   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_SESSION_ID,
  127    134   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_REQUEST_ID,
  128    135   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_LANGUAGE_CODE,
  129    136   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  130    137   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_ENCODING,
  131    138   
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_RESULT_STREAM,
         139  +
        &STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER__REQUEST_ID,
  132    140   
    ],
  133    141   
);
  134    142   
impl StartMedicalScribeStreamOutput {
  135    143   
    /// The schema for this shape.
  136    144   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA;
  137    145   
}
  138    146   
impl ::aws_smithy_schema::serde::SerializableStruct for StartMedicalScribeStreamOutput {
  139    147   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  140    148   
    fn serialize_members(
  141    149   
        &self,
  142    150   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  143    151   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  144    152   
        if let Some(ref val) = self.session_id {
  145    153   
            ser.write_string(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_SESSION_ID, val)?;
  146    154   
        }
  147    155   
        if let Some(ref val) = self.request_id {
  148    156   
            ser.write_string(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_REQUEST_ID, val)?;
  149    157   
        }
  150    158   
        if let Some(ref val) = self.language_code {
  151    159   
            ser.write_string(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  152    160   
        }
  153    161   
        if let Some(ref val) = self.media_sample_rate_hertz {
  154    162   
            ser.write_integer(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  155    163   
        }
  156    164   
        if let Some(ref val) = self.media_encoding {
  157    165   
            ser.write_string(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  158    166   
        }
  159         -
        {
  160         -
            let val = &self.result_stream;
  161         -
            ser.write_null(&STARTMEDICALSCRIBESTREAMOUTPUT_MEMBER_RESULT_STREAM)?;
  162         -
        }
  163    167   
        Ok(())
  164    168   
    }
  165    169   
}
  166    170   
impl StartMedicalScribeStreamOutput {
  167    171   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  168         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  169         -
        deserializer: &mut D,
         172  +
    pub fn deserialize(
         173  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  170    174   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  171    175   
        #[allow(unused_variables, unused_mut)]
  172    176   
        let mut builder = Self::builder();
  173    177   
        #[allow(
  174    178   
            unused_variables,
  175    179   
            unreachable_code,
  176    180   
            clippy::single_match,
  177    181   
            clippy::match_single_binding,
  178    182   
            clippy::diverging_sub_expression
  179    183   
        )]
  180         -
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
         184  +
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
  181    185   
            match member.member_index() {
  182    186   
                Some(0) => {
  183    187   
                    builder.session_id = Some(deser.read_string(member)?);
  184    188   
                }
  185    189   
                Some(1) => {
  186    190   
                    builder.request_id = Some(deser.read_string(member)?);
  187    191   
                }
  188    192   
                Some(2) => {
  189    193   
                    builder.language_code = Some(crate::types::MedicalScribeLanguageCode::from(deser.read_string(member)?.as_str()));
  190    194   
                }
  191    195   
                Some(3) => {
  192    196   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  193    197   
                }
  194    198   
                Some(4) => {
  195    199   
                    builder.media_encoding = Some(crate::types::MedicalScribeMediaEncoding::from(deser.read_string(member)?.as_str()));
  196    200   
                }
  197    201   
                Some(5) => {
  198    202   
                    builder.result_stream = Some({
  199    203   
                        let _ = member;
  200         -
                        todo!("deserialize aggregate")
         204  +
                        todo!("deserialize streaming union")
         205  +
                    });
         206  +
                }
         207  +
                Some(6) => {
         208  +
                    builder._request_id = Some(deser.read_string(member)?);
         209  +
                }
         210  +
                _ => {}
         211  +
            }
         212  +
            Ok(())
         213  +
        })?;
         214  +
        builder
         215  +
            .build()
         216  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         217  +
    }
         218  +
}
         219  +
impl StartMedicalScribeStreamOutput {
         220  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         221  +
    /// Header-bound members are read directly from headers, avoiding runtime
         222  +
    /// member iteration overhead. Body members are read via the deserializer.
         223  +
    pub fn deserialize_with_response(
         224  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         225  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         226  +
        _status: u16,
         227  +
        _body: &[u8],
         228  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         229  +
        #[allow(unused_variables, unused_mut)]
         230  +
        let mut builder = Self::builder();
         231  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         232  +
            builder.session_id = Some(val.to_string());
         233  +
        }
         234  +
        if let Some(val) = headers.get("x-amzn-request-id") {
         235  +
            builder.request_id = Some(val.to_string());
         236  +
        }
         237  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         238  +
            builder.language_code = Some(crate::types::MedicalScribeLanguageCode::from(val));
         239  +
        }
         240  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         241  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         242  +
        }
         243  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         244  +
            builder.media_encoding = Some(crate::types::MedicalScribeMediaEncoding::from(val));
         245  +
        }
         246  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         247  +
            builder._request_id = Some(val.to_string());
         248  +
        }
         249  +
        #[allow(
         250  +
            unused_variables,
         251  +
            unreachable_code,
         252  +
            clippy::single_match,
         253  +
            clippy::match_single_binding,
         254  +
            clippy::diverging_sub_expression
         255  +
        )]
         256  +
        deserializer.read_struct(&STARTMEDICALSCRIBESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
         257  +
            match member.member_index() {
         258  +
                Some(0) => { /* read from headers above */ }
         259  +
                Some(1) => { /* read from headers above */ }
         260  +
                Some(2) => { /* read from headers above */ }
         261  +
                Some(3) => { /* read from headers above */ }
         262  +
                Some(4) => { /* read from headers above */ }
         263  +
                Some(5) => {
         264  +
                    builder.result_stream = Some({
         265  +
                        let _ = member;
         266  +
                        todo!("deserialize streaming union")
  201    267   
                    });
  202    268   
                }
  203    269   
                _ => {}
  204    270   
            }
  205    271   
            Ok(())
  206    272   
        })?;
  207    273   
        builder
  208    274   
            .build()
  209    275   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  210    276   
    }

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_medical_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 `StartMedicalStreamTranscription`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StartMedicalStreamTranscription;
    6      6   
impl StartMedicalStreamTranscription {
    7      7   
    /// Creates a new `StartMedicalStreamTranscription`
    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_medical_stream_transcription::StartMedicalStreamTranscriptionInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionOutput::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_medical_stream_transcription::StartMedicalStreamTranscriptionInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -143,149 +272,405 @@
  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_medical_stream_transcription::de_start_medical_stream_transcription_http_response(response),
  167    173   
        ))
  168    174   
    }
  169    175   
  170    176   
    fn deserialize_nonstreaming(
  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_medical_stream_transcription::de_start_medical_stream_transcription_http_error(
  178         -
                response.status().as_u16(),
         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_medical_stream_transcription::StartMedicalStreamTranscriptionError::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" => {
         207  +
                crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::BadRequestException({
         208  +
                    let mut tmp = match protocol
         209  +
                        .deserialize_response(response, crate::types::error::BadRequestException::SCHEMA, _cfg)
         210  +
                        .and_then(|mut deser| {
         211  +
                            crate::types::error::BadRequestException::deserialize_with_response(
         212  +
                                &mut *deser,
  179    213   
                                response.headers(),
         214  +
                                response.status().into(),
  180    215   
                                body,
  181         -
            ),
  182    216   
                            )
         217  +
                        }) {
         218  +
                        ::std::result::Result::Ok(val) => val,
         219  +
                        ::std::result::Result::Err(e) => {
         220  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         221  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         222  +
                            ))
         223  +
                        }
         224  +
                    };
         225  +
                    tmp.meta = generic;
         226  +
                    if tmp.message.is_none() {
         227  +
                        tmp.message = _error_message;
         228  +
                    }
         229  +
                    tmp
         230  +
                })
         231  +
            }
         232  +
            "ConflictException" => crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::ConflictException({
         233  +
                let mut tmp = match protocol
         234  +
                    .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         235  +
                    .and_then(|mut deser| {
         236  +
                        crate::types::error::ConflictException::deserialize_with_response(
         237  +
                            &mut *deser,
         238  +
                            response.headers(),
         239  +
                            response.status().into(),
         240  +
                            body,
         241  +
                        )
         242  +
                    }) {
         243  +
                    ::std::result::Result::Ok(val) => val,
         244  +
                    ::std::result::Result::Err(e) => {
         245  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         246  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         247  +
                        ))
         248  +
                    }
         249  +
                };
         250  +
                tmp.meta = generic;
         251  +
                if tmp.message.is_none() {
         252  +
                    tmp.message = _error_message;
         253  +
                }
         254  +
                tmp
         255  +
            }),
         256  +
            "InternalFailureException" => {
         257  +
                crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::InternalFailureException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::InternalFailureException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::InternalFailureException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                })
         281  +
            }
         282  +
            "LimitExceededException" => {
         283  +
                crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::LimitExceededException({
         284  +
                    let mut tmp = match protocol
         285  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         286  +
                        .and_then(|mut deser| {
         287  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         288  +
                                &mut *deser,
         289  +
                                response.headers(),
         290  +
                                response.status().into(),
         291  +
                                body,
         292  +
                            )
         293  +
                        }) {
         294  +
                        ::std::result::Result::Ok(val) => val,
         295  +
                        ::std::result::Result::Err(e) => {
         296  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         297  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         298  +
                            ))
         299  +
                        }
         300  +
                    };
         301  +
                    tmp.meta = generic;
         302  +
                    if tmp.message.is_none() {
         303  +
                        tmp.message = _error_message;
         304  +
                    }
         305  +
                    tmp
         306  +
                })
         307  +
            }
         308  +
            "ServiceUnavailableException" => {
         309  +
                crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::ServiceUnavailableException({
         310  +
                    let mut tmp = match protocol
         311  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         312  +
                        .and_then(|mut deser| {
         313  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         314  +
                                &mut *deser,
         315  +
                                response.headers(),
         316  +
                                response.status().into(),
         317  +
                                body,
         318  +
                            )
         319  +
                        }) {
         320  +
                        ::std::result::Result::Ok(val) => val,
         321  +
                        ::std::result::Result::Err(e) => {
         322  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         323  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         324  +
                            ))
         325  +
                        }
         326  +
                    };
         327  +
                    tmp.meta = generic;
         328  +
                    if tmp.message.is_none() {
         329  +
                        tmp.message = _error_message;
         330  +
                    }
         331  +
                    tmp
         332  +
                })
         333  +
            }
         334  +
            _ => crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError::generic(generic),
         335  +
        };
         336  +
        ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         337  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         338  +
        ))
  183    339   
    }
  184    340   
}
  185    341   
#[derive(Debug)]
  186    342   
struct StartMedicalStreamTranscriptionRequestSerializer;
  187    343   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartMedicalStreamTranscriptionRequestSerializer {
  188    344   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  189    345   
    fn serialize_input(
  190    346   
        &self,
  191    347   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  192    348   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  193    349   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  194    350   
        let input = input
  195    351   
            .downcast::<crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionInput>()
  196    352   
            .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_medical_stream_transcription::StartMedicalStreamTranscriptionInput,
  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, "/medical-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_medical_stream_transcription::StartMedicalStreamTranscriptionInput,
  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 =
  219         -
                    crate::protocol_serde::shape_start_medical_stream_transcription::ser_start_medical_stream_transcription_headers(input, builder)?;
  220         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  221         -
            }
  222         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  223         -
            builder =
  224         -
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  225         -
            builder
  226         -
        };
  227         -
        let body = ::aws_smithy_types::body::SdkBody::from({
         353  +
        let protocol = _cfg
         354  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         355  +
            .expect("a SharedClientProtocol is required");
         356  +
        let mut request = protocol
         357  +
            .serialize_request(&input, StartMedicalStreamTranscription::INPUT_SCHEMA, "", _cfg)
         358  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         359  +
        *request.body_mut() = ::aws_smithy_types::body::SdkBody::from({
  228    360   
            let error_marshaller = crate::event_stream_serde::AudioStreamErrorMarshaller::new();
  229    361   
            let marshaller = crate::event_stream_serde::AudioStreamMarshaller::new();
  230    362   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  231    363   
            _cfg.interceptor_state().store_put(signer_sender);
  232    364   
            ::aws_smithy_types::body::SdkBody::from_body_1_x(::http_body_util::StreamBody::new(input.audio_stream.into_body_stream(
  233    365   
                marshaller,
  234    366   
                error_marshaller,
  235    367   
                signer,
  236    368   
            )))
  237    369   
        });
  238         -
        if let Some(content_length) = body.content_length() {
  239         -
            let content_length = content_length.to_string();
  240         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  241         -
        }
  242         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         370  +
        // The protocol may have set Content-Length based on the initial empty body.
         371  +
        // Remove it since the event stream body has unknown length.
         372  +
        request.headers_mut().remove("Content-Length");
         373  +
        request.headers_mut().insert("Content-Type", "application/vnd.amazon.eventstream");
         374  +
         375  +
        return ::std::result::Result::Ok(request);
  243    376   
    }
  244    377   
}
  245    378   
#[derive(Debug)]
  246    379   
struct StartMedicalStreamTranscriptionEndpointParamsInterceptor;
  247    380   
  248    381   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartMedicalStreamTranscriptionEndpointParamsInterceptor {
  249    382   
    fn name(&self) -> &'static str {
  250    383   
        "StartMedicalStreamTranscriptionEndpointParamsInterceptor"
  251    384   
    }
  252    385   

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

@@ -105,105 +419,497 @@
  125    125   
    "com.amazonaws.transcribestreaming.synthetic",
  126    126   
    "StartMedicalStreamTranscriptionInput",
  127    127   
);
  128    128   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$LanguageCode",
  131    131   
        "com.amazonaws.transcribestreaming.synthetic",
  132    132   
        "StartMedicalStreamTranscriptionInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::String,
  135         -
    "language_code",
         135  +
    "LanguageCode",
  136    136   
    0,
  137    137   
)
  138    138   
.with_http_header("x-amzn-transcribe-language-code");
  139    139   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  140    140   
    ::aws_smithy_schema::ShapeId::from_static(
  141    141   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$MediaSampleRateHertz",
  142    142   
        "com.amazonaws.transcribestreaming.synthetic",
  143    143   
        "StartMedicalStreamTranscriptionInput",
  144    144   
    ),
  145    145   
    ::aws_smithy_schema::ShapeType::Integer,
  146         -
    "media_sample_rate_hertz",
         146  +
    "MediaSampleRateHertz",
  147    147   
    1,
  148    148   
)
  149    149   
.with_http_header("x-amzn-transcribe-sample-rate");
  150    150   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$MediaEncoding",
  153    153   
        "com.amazonaws.transcribestreaming.synthetic",
  154    154   
        "StartMedicalStreamTranscriptionInput",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::String,
  157         -
    "media_encoding",
         157  +
    "MediaEncoding",
  158    158   
    2,
  159    159   
)
  160    160   
.with_http_header("x-amzn-transcribe-media-encoding");
  161    161   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  162    162   
    ::aws_smithy_schema::ShapeId::from_static(
  163    163   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$VocabularyName",
  164    164   
        "com.amazonaws.transcribestreaming.synthetic",
  165    165   
        "StartMedicalStreamTranscriptionInput",
  166    166   
    ),
  167    167   
    ::aws_smithy_schema::ShapeType::String,
  168         -
    "vocabulary_name",
         168  +
    "VocabularyName",
  169    169   
    3,
  170    170   
)
  171    171   
.with_http_header("x-amzn-transcribe-vocabulary-name");
  172    172   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SPECIALTY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  173    173   
    ::aws_smithy_schema::ShapeId::from_static(
  174    174   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$Specialty",
  175    175   
        "com.amazonaws.transcribestreaming.synthetic",
  176    176   
        "StartMedicalStreamTranscriptionInput",
  177    177   
    ),
  178    178   
    ::aws_smithy_schema::ShapeType::String,
  179         -
    "specialty",
         179  +
    "Specialty",
  180    180   
    4,
  181    181   
)
  182    182   
.with_http_header("x-amzn-transcribe-specialty");
  183    183   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  184    184   
    ::aws_smithy_schema::ShapeId::from_static(
  185    185   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$Type",
  186    186   
        "com.amazonaws.transcribestreaming.synthetic",
  187    187   
        "StartMedicalStreamTranscriptionInput",
  188    188   
    ),
  189    189   
    ::aws_smithy_schema::ShapeType::String,
  190         -
    "r##type",
         190  +
    "Type",
  191    191   
    5,
  192    192   
)
  193    193   
.with_http_header("x-amzn-transcribe-type");
  194    194   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  195    195   
    ::aws_smithy_schema::ShapeId::from_static(
  196    196   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$ShowSpeakerLabel",
  197    197   
        "com.amazonaws.transcribestreaming.synthetic",
  198    198   
        "StartMedicalStreamTranscriptionInput",
  199    199   
    ),
  200    200   
    ::aws_smithy_schema::ShapeType::Boolean,
  201         -
    "show_speaker_label",
         201  +
    "ShowSpeakerLabel",
  202    202   
    6,
  203    203   
)
  204    204   
.with_http_header("x-amzn-transcribe-show-speaker-label");
  205    205   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  206    206   
    ::aws_smithy_schema::ShapeId::from_static(
  207    207   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$SessionId",
  208    208   
        "com.amazonaws.transcribestreaming.synthetic",
  209    209   
        "StartMedicalStreamTranscriptionInput",
  210    210   
    ),
  211    211   
    ::aws_smithy_schema::ShapeType::String,
  212         -
    "session_id",
         212  +
    "SessionId",
  213    213   
    7,
  214    214   
)
  215    215   
.with_http_header("x-amzn-transcribe-session-id");
  216    216   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  217    217   
    ::aws_smithy_schema::ShapeId::from_static(
  218    218   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$AudioStream",
  219    219   
        "com.amazonaws.transcribestreaming.synthetic",
  220    220   
        "StartMedicalStreamTranscriptionInput",
  221    221   
    ),
  222    222   
    ::aws_smithy_schema::ShapeType::Union,
  223         -
    "audio_stream",
         223  +
    "AudioStream",
  224    224   
    8,
  225    225   
)
  226    226   
.with_http_payload();
  227    227   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION: ::aws_smithy_schema::Schema =
  228    228   
    ::aws_smithy_schema::Schema::new_member(
  229    229   
        ::aws_smithy_schema::ShapeId::from_static(
  230    230   
            "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$EnableChannelIdentification",
  231    231   
            "com.amazonaws.transcribestreaming.synthetic",
  232    232   
            "StartMedicalStreamTranscriptionInput",
  233    233   
        ),
  234    234   
        ::aws_smithy_schema::ShapeType::Boolean,
  235         -
        "enable_channel_identification",
         235  +
        "EnableChannelIdentification",
  236    236   
        9,
  237    237   
    )
  238    238   
    .with_http_header("x-amzn-transcribe-enable-channel-identification");
  239    239   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  240    240   
    ::aws_smithy_schema::ShapeId::from_static(
  241    241   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$NumberOfChannels",
  242    242   
        "com.amazonaws.transcribestreaming.synthetic",
  243    243   
        "StartMedicalStreamTranscriptionInput",
  244    244   
    ),
  245    245   
    ::aws_smithy_schema::ShapeType::Integer,
  246         -
    "number_of_channels",
         246  +
    "NumberOfChannels",
  247    247   
    10,
  248    248   
)
  249    249   
.with_http_header("x-amzn-transcribe-number-of-channels");
  250    250   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE: ::aws_smithy_schema::Schema =
  251    251   
    ::aws_smithy_schema::Schema::new_member(
  252    252   
        ::aws_smithy_schema::ShapeId::from_static(
  253    253   
            "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionInput$ContentIdentificationType",
  254    254   
            "com.amazonaws.transcribestreaming.synthetic",
  255    255   
            "StartMedicalStreamTranscriptionInput",
  256    256   
        ),
  257    257   
        ::aws_smithy_schema::ShapeType::String,
  258         -
        "content_identification_type",
         258  +
        "ContentIdentificationType",
  259    259   
        11,
  260    260   
    )
  261    261   
    .with_http_header("x-amzn-transcribe-content-identification-type");
  262    262   
static STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  263    263   
    STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA_ID,
  264    264   
    ::aws_smithy_schema::ShapeType::Structure,
  265    265   
    &[
  266    266   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE,
  267    267   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  268    268   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING,
  269    269   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME,
  270    270   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SPECIALTY,
  271    271   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_TYPE,
  272    272   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL,
  273    273   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID,
  274    274   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM,
  275    275   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION,
  276    276   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS,
  277    277   
        &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
  278    278   
    ],
  279         -
);
         279  +
)
         280  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/medical-stream-transcription", None));
  280    281   
impl StartMedicalStreamTranscriptionInput {
  281    282   
    /// The schema for this shape.
  282    283   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA;
  283    284   
}
  284    285   
impl ::aws_smithy_schema::serde::SerializableStruct for StartMedicalStreamTranscriptionInput {
  285    286   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  286    287   
    fn serialize_members(
  287    288   
        &self,
  288    289   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  289    290   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  290    291   
        if let Some(ref val) = self.language_code {
  291    292   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  292    293   
        }
  293    294   
        if let Some(ref val) = self.media_sample_rate_hertz {
  294    295   
            ser.write_integer(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  295    296   
        }
  296    297   
        if let Some(ref val) = self.media_encoding {
  297    298   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  298    299   
        }
  299    300   
        if let Some(ref val) = self.vocabulary_name {
  300    301   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_VOCABULARY_NAME, val)?;
  301    302   
        }
  302    303   
        if let Some(ref val) = self.specialty {
  303    304   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SPECIALTY, val.as_str())?;
  304    305   
        }
  305    306   
        if let Some(ref val) = self.r#type {
  306    307   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_TYPE, val.as_str())?;
  307    308   
        }
  308    309   
        if let Some(ref val) = self.show_speaker_label {
  309    310   
            ser.write_boolean(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SHOW_SPEAKER_LABEL, *val)?;
  310    311   
        }
  311    312   
        if let Some(ref val) = self.session_id {
  312    313   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_SESSION_ID, val)?;
  313    314   
        }
  314         -
        {
  315         -
            let val = &self.audio_stream;
  316         -
            ser.write_null(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_AUDIO_STREAM)?;
  317         -
        }
  318    315   
        if let Some(ref val) = self.enable_channel_identification {
  319    316   
            ser.write_boolean(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION, *val)?;
  320    317   
        }
  321    318   
        if let Some(ref val) = self.number_of_channels {
  322    319   
            ser.write_integer(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_NUMBER_OF_CHANNELS, *val)?;
  323    320   
        }
  324    321   
        if let Some(ref val) = self.content_identification_type {
  325    322   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE, val.as_str())?;
  326    323   
        }
  327    324   
        Ok(())
  328    325   
    }
  329    326   
}
  330    327   
impl StartMedicalStreamTranscriptionInput {
  331    328   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  332         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  333         -
        deserializer: &mut D,
         329  +
    pub fn deserialize(
         330  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  334    331   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  335    332   
        #[allow(unused_variables, unused_mut)]
  336    333   
        let mut builder = Self::builder();
  337    334   
        #[allow(
  338    335   
            unused_variables,
  339    336   
            unreachable_code,
  340    337   
            clippy::single_match,
  341    338   
            clippy::match_single_binding,
  342    339   
            clippy::diverging_sub_expression
  343    340   
        )]
  344         -
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA, (), |_, member, deser| {
         341  +
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA, &mut |member, deser| {
  345    342   
            match member.member_index() {
  346    343   
                Some(0) => {
  347    344   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  348    345   
                }
  349    346   
                Some(1) => {
  350    347   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  351    348   
                }
  352    349   
                Some(2) => {
  353    350   
                    builder.media_encoding = Some(crate::types::MediaEncoding::from(deser.read_string(member)?.as_str()));
  354    351   
                }
  355    352   
                Some(3) => {
  356    353   
                    builder.vocabulary_name = Some(deser.read_string(member)?);
  357    354   
                }
  358    355   
                Some(4) => {
  359    356   
                    builder.specialty = Some(crate::types::Specialty::from(deser.read_string(member)?.as_str()));
  360    357   
                }
  361    358   
                Some(5) => {
  362    359   
                    builder.r#type = Some(crate::types::Type::from(deser.read_string(member)?.as_str()));
  363    360   
                }
  364    361   
                Some(6) => {
  365    362   
                    builder.show_speaker_label = Some(deser.read_boolean(member)?);
  366    363   
                }
  367    364   
                Some(7) => {
  368    365   
                    builder.session_id = Some(deser.read_string(member)?);
  369    366   
                }
  370    367   
                Some(8) => {
  371    368   
                    builder.audio_stream = Some({
  372    369   
                        let _ = member;
  373         -
                        todo!("deserialize aggregate")
         370  +
                        todo!("deserialize streaming union")
  374    371   
                    });
  375    372   
                }
  376    373   
                Some(9) => {
  377    374   
                    builder.enable_channel_identification = Some(deser.read_boolean(member)?);
  378    375   
                }
  379    376   
                Some(10) => {
  380    377   
                    builder.number_of_channels = Some(deser.read_integer(member)?);
  381    378   
                }
  382    379   
                Some(11) => {
  383    380   
                    builder.content_identification_type =
  384    381   
                        Some(crate::types::MedicalContentIdentificationType::from(deser.read_string(member)?.as_str()));
  385    382   
                }
  386    383   
                _ => {}
  387    384   
            }
  388    385   
            Ok(())
  389    386   
        })?;
         387  +
        builder.media_sample_rate_hertz = builder.media_sample_rate_hertz.or(Some(0i32));
         388  +
        builder
         389  +
            .build()
         390  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         391  +
    }
         392  +
}
         393  +
impl StartMedicalStreamTranscriptionInput {
         394  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         395  +
    /// Header-bound members are read directly from headers, avoiding runtime
         396  +
    /// member iteration overhead. Body members are read via the deserializer.
         397  +
    pub fn deserialize_with_response(
         398  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         399  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         400  +
        _status: u16,
         401  +
        _body: &[u8],
         402  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         403  +
        #[allow(unused_variables, unused_mut)]
         404  +
        let mut builder = Self::builder();
         405  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         406  +
            builder.language_code = Some(crate::types::LanguageCode::from(val));
         407  +
        }
         408  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         409  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         410  +
        }
         411  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         412  +
            builder.media_encoding = Some(crate::types::MediaEncoding::from(val));
         413  +
        }
         414  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-name") {
         415  +
            builder.vocabulary_name = Some(val.to_string());
         416  +
        }
         417  +
        if let Some(val) = headers.get("x-amzn-transcribe-specialty") {
         418  +
            builder.specialty = Some(crate::types::Specialty::from(val));
         419  +
        }
         420  +
        if let Some(val) = headers.get("x-amzn-transcribe-type") {
         421  +
            builder.r#type = Some(crate::types::Type::from(val));
         422  +
        }
         423  +
        if let Some(val) = headers.get("x-amzn-transcribe-show-speaker-label") {
         424  +
            builder.show_speaker_label = val.parse::<bool>().ok();
         425  +
        }
         426  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         427  +
            builder.session_id = Some(val.to_string());
         428  +
        }
         429  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-channel-identification") {
         430  +
            builder.enable_channel_identification = val.parse::<bool>().ok();
         431  +
        }
         432  +
        if let Some(val) = headers.get("x-amzn-transcribe-number-of-channels") {
         433  +
            builder.number_of_channels = val.parse::<i32>().ok();
         434  +
        }
         435  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-identification-type") {
         436  +
            builder.content_identification_type = Some(crate::types::MedicalContentIdentificationType::from(val));
         437  +
        }
         438  +
        #[allow(
         439  +
            unused_variables,
         440  +
            unreachable_code,
         441  +
            clippy::single_match,
         442  +
            clippy::match_single_binding,
         443  +
            clippy::diverging_sub_expression
         444  +
        )]
         445  +
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONINPUT_SCHEMA, &mut |member, deser| {
         446  +
            match member.member_index() {
         447  +
                Some(0) => { /* read from headers above */ }
         448  +
                Some(1) => { /* read from headers above */ }
         449  +
                Some(2) => { /* read from headers above */ }
         450  +
                Some(3) => { /* read from headers above */ }
         451  +
                Some(4) => { /* read from headers above */ }
         452  +
                Some(5) => { /* read from headers above */ }
         453  +
                Some(6) => { /* read from headers above */ }
         454  +
                Some(7) => { /* read from headers above */ }
         455  +
                Some(8) => {
         456  +
                    builder.audio_stream = Some({
         457  +
                        let _ = member;
         458  +
                        todo!("deserialize streaming union")
         459  +
                    });
         460  +
                }
         461  +
                Some(9) => { /* read from headers above */ }
         462  +
                Some(10) => { /* read from headers above */ }
         463  +
                Some(11) => { /* read from headers above */ }
         464  +
                _ => {}
         465  +
            }
         466  +
            Ok(())
         467  +
        })?;
  390    468   
        builder
  391    469   
            .build()
  392    470   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  393    471   
    }
  394    472   
}
  395    473   
impl StartMedicalStreamTranscriptionInput {
  396    474   
    /// Creates a new builder-style object to manufacture [`StartMedicalStreamTranscriptionInput`](crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionInput).
  397    475   
    pub fn builder() -> crate::operation::start_medical_stream_transcription::builders::StartMedicalStreamTranscriptionInputBuilder {
  398    476   
        crate::operation::start_medical_stream_transcription::builders::StartMedicalStreamTranscriptionInputBuilder::default()
  399    477   
    }

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

@@ -74,74 +404,498 @@
   94     94   
    "com.amazonaws.transcribestreaming.synthetic",
   95     95   
    "StartMedicalStreamTranscriptionOutput",
   96     96   
);
   97     97   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$RequestId",
  100    100   
        "com.amazonaws.transcribestreaming.synthetic",
  101    101   
        "StartMedicalStreamTranscriptionOutput",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::String,
  104         -
    "request_id",
         104  +
    "RequestId",
  105    105   
    0,
  106    106   
)
  107    107   
.with_http_header("x-amzn-request-id");
  108    108   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$LanguageCode",
  111    111   
        "com.amazonaws.transcribestreaming.synthetic",
  112    112   
        "StartMedicalStreamTranscriptionOutput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::String,
  115         -
    "language_code",
         115  +
    "LanguageCode",
  116    116   
    1,
  117    117   
)
  118    118   
.with_http_header("x-amzn-transcribe-language-code");
  119    119   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  120    120   
    ::aws_smithy_schema::ShapeId::from_static(
  121    121   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$MediaSampleRateHertz",
  122    122   
        "com.amazonaws.transcribestreaming.synthetic",
  123    123   
        "StartMedicalStreamTranscriptionOutput",
  124    124   
    ),
  125    125   
    ::aws_smithy_schema::ShapeType::Integer,
  126         -
    "media_sample_rate_hertz",
         126  +
    "MediaSampleRateHertz",
  127    127   
    2,
  128    128   
)
  129    129   
.with_http_header("x-amzn-transcribe-sample-rate");
  130    130   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$MediaEncoding",
  133    133   
        "com.amazonaws.transcribestreaming.synthetic",
  134    134   
        "StartMedicalStreamTranscriptionOutput",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::String,
  137         -
    "media_encoding",
         137  +
    "MediaEncoding",
  138    138   
    3,
  139    139   
)
  140    140   
.with_http_header("x-amzn-transcribe-media-encoding");
  141    141   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  142    142   
    ::aws_smithy_schema::ShapeId::from_static(
  143    143   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$VocabularyName",
  144    144   
        "com.amazonaws.transcribestreaming.synthetic",
  145    145   
        "StartMedicalStreamTranscriptionOutput",
  146    146   
    ),
  147    147   
    ::aws_smithy_schema::ShapeType::String,
  148         -
    "vocabulary_name",
         148  +
    "VocabularyName",
  149    149   
    4,
  150    150   
)
  151    151   
.with_http_header("x-amzn-transcribe-vocabulary-name");
  152    152   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SPECIALTY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  153    153   
    ::aws_smithy_schema::ShapeId::from_static(
  154    154   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$Specialty",
  155    155   
        "com.amazonaws.transcribestreaming.synthetic",
  156    156   
        "StartMedicalStreamTranscriptionOutput",
  157    157   
    ),
  158    158   
    ::aws_smithy_schema::ShapeType::String,
  159         -
    "specialty",
         159  +
    "Specialty",
  160    160   
    5,
  161    161   
)
  162    162   
.with_http_header("x-amzn-transcribe-specialty");
  163    163   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  164    164   
    ::aws_smithy_schema::ShapeId::from_static(
  165    165   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$Type",
  166    166   
        "com.amazonaws.transcribestreaming.synthetic",
  167    167   
        "StartMedicalStreamTranscriptionOutput",
  168    168   
    ),
  169    169   
    ::aws_smithy_schema::ShapeType::String,
  170         -
    "r##type",
         170  +
    "Type",
  171    171   
    6,
  172    172   
)
  173    173   
.with_http_header("x-amzn-transcribe-type");
  174    174   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  175    175   
    ::aws_smithy_schema::ShapeId::from_static(
  176    176   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$ShowSpeakerLabel",
  177    177   
        "com.amazonaws.transcribestreaming.synthetic",
  178    178   
        "StartMedicalStreamTranscriptionOutput",
  179    179   
    ),
  180    180   
    ::aws_smithy_schema::ShapeType::Boolean,
  181         -
    "show_speaker_label",
         181  +
    "ShowSpeakerLabel",
  182    182   
    7,
  183    183   
)
  184    184   
.with_http_header("x-amzn-transcribe-show-speaker-label");
  185    185   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  186    186   
    ::aws_smithy_schema::ShapeId::from_static(
  187    187   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$SessionId",
  188    188   
        "com.amazonaws.transcribestreaming.synthetic",
  189    189   
        "StartMedicalStreamTranscriptionOutput",
  190    190   
    ),
  191    191   
    ::aws_smithy_schema::ShapeType::String,
  192         -
    "session_id",
         192  +
    "SessionId",
  193    193   
    8,
  194    194   
)
  195    195   
.with_http_header("x-amzn-transcribe-session-id");
  196    196   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  197    197   
    ::aws_smithy_schema::ShapeId::from_static(
  198    198   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$TranscriptResultStream",
  199    199   
        "com.amazonaws.transcribestreaming.synthetic",
  200    200   
        "StartMedicalStreamTranscriptionOutput",
  201    201   
    ),
  202    202   
    ::aws_smithy_schema::ShapeType::Union,
  203         -
    "transcript_result_stream",
         203  +
    "TranscriptResultStream",
  204    204   
    9,
  205    205   
)
  206    206   
.with_http_payload();
  207    207   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION: ::aws_smithy_schema::Schema =
  208    208   
    ::aws_smithy_schema::Schema::new_member(
  209    209   
        ::aws_smithy_schema::ShapeId::from_static(
  210    210   
            "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$EnableChannelIdentification",
  211    211   
            "com.amazonaws.transcribestreaming.synthetic",
  212    212   
            "StartMedicalStreamTranscriptionOutput",
  213    213   
        ),
  214    214   
        ::aws_smithy_schema::ShapeType::Boolean,
  215         -
        "enable_channel_identification",
         215  +
        "EnableChannelIdentification",
  216    216   
        10,
  217    217   
    )
  218    218   
    .with_http_header("x-amzn-transcribe-enable-channel-identification");
  219    219   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_NUMBER_OF_CHANNELS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  220    220   
    ::aws_smithy_schema::ShapeId::from_static(
  221    221   
        "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$NumberOfChannels",
  222    222   
        "com.amazonaws.transcribestreaming.synthetic",
  223    223   
        "StartMedicalStreamTranscriptionOutput",
  224    224   
    ),
  225    225   
    ::aws_smithy_schema::ShapeType::Integer,
  226         -
    "number_of_channels",
         226  +
    "NumberOfChannels",
  227    227   
    11,
  228    228   
)
  229    229   
.with_http_header("x-amzn-transcribe-number-of-channels");
  230    230   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE: ::aws_smithy_schema::Schema =
  231    231   
    ::aws_smithy_schema::Schema::new_member(
  232    232   
        ::aws_smithy_schema::ShapeId::from_static(
  233    233   
            "com.amazonaws.transcribestreaming.synthetic#StartMedicalStreamTranscriptionOutput$ContentIdentificationType",
  234    234   
            "com.amazonaws.transcribestreaming.synthetic",
  235    235   
            "StartMedicalStreamTranscriptionOutput",
  236    236   
        ),
  237    237   
        ::aws_smithy_schema::ShapeType::String,
  238         -
        "content_identification_type",
         238  +
        "ContentIdentificationType",
  239    239   
        12,
  240    240   
    )
  241    241   
    .with_http_header("x-amzn-transcribe-content-identification-type");
         242  +
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         243  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         244  +
    ::aws_smithy_schema::ShapeType::String,
         245  +
    "request_id",
         246  +
    13,
         247  +
)
         248  +
.with_http_header("x-amzn-requestid");
  242    249   
static STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  243    250   
    STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA_ID,
  244    251   
    ::aws_smithy_schema::ShapeType::Structure,
  245    252   
    &[
  246    253   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID,
  247    254   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE,
  248    255   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ,
  249    256   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING,
  250    257   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME,
  251    258   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SPECIALTY,
  252    259   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TYPE,
  253    260   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL,
  254    261   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID,
  255    262   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM,
  256    263   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION,
  257    264   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_NUMBER_OF_CHANNELS,
  258    265   
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE,
         266  +
        &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER__REQUEST_ID,
  259    267   
    ],
  260    268   
);
  261    269   
impl StartMedicalStreamTranscriptionOutput {
  262    270   
    /// The schema for this shape.
  263    271   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA;
  264    272   
}
  265    273   
impl ::aws_smithy_schema::serde::SerializableStruct for StartMedicalStreamTranscriptionOutput {
  266    274   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  267    275   
    fn serialize_members(
  268    276   
        &self,
  269    277   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  270    278   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  271    279   
        if let Some(ref val) = self.request_id {
  272    280   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_REQUEST_ID, val)?;
  273    281   
        }
  274    282   
        if let Some(ref val) = self.language_code {
  275    283   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_LANGUAGE_CODE, val.as_str())?;
  276    284   
        }
  277    285   
        if let Some(ref val) = self.media_sample_rate_hertz {
  278    286   
            ser.write_integer(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_SAMPLE_RATE_HERTZ, *val)?;
  279    287   
        }
  280    288   
        if let Some(ref val) = self.media_encoding {
  281    289   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_MEDIA_ENCODING, val.as_str())?;
  282    290   
        }
  283    291   
        if let Some(ref val) = self.vocabulary_name {
  284    292   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_VOCABULARY_NAME, val)?;
  285    293   
        }
  286    294   
        if let Some(ref val) = self.specialty {
  287    295   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SPECIALTY, val.as_str())?;
  288    296   
        }
  289    297   
        if let Some(ref val) = self.r#type {
  290    298   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TYPE, val.as_str())?;
  291    299   
        }
  292    300   
        {
  293    301   
            let val = &self.show_speaker_label;
  294    302   
            ser.write_boolean(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SHOW_SPEAKER_LABEL, *val)?;
  295    303   
        }
  296    304   
        if let Some(ref val) = self.session_id {
  297    305   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_SESSION_ID, val)?;
  298    306   
        }
  299         -
        {
  300         -
            let val = &self.transcript_result_stream;
  301         -
            ser.write_null(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_TRANSCRIPT_RESULT_STREAM)?;
  302         -
        }
  303    307   
        {
  304    308   
            let val = &self.enable_channel_identification;
  305    309   
            ser.write_boolean(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_ENABLE_CHANNEL_IDENTIFICATION, *val)?;
  306    310   
        }
  307    311   
        if let Some(ref val) = self.number_of_channels {
  308    312   
            ser.write_integer(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_NUMBER_OF_CHANNELS, *val)?;
  309    313   
        }
  310    314   
        if let Some(ref val) = self.content_identification_type {
  311    315   
            ser.write_string(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_MEMBER_CONTENT_IDENTIFICATION_TYPE, val.as_str())?;
  312    316   
        }
  313    317   
        Ok(())
  314    318   
    }
  315    319   
}
  316    320   
impl StartMedicalStreamTranscriptionOutput {
  317    321   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  318         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  319         -
        deserializer: &mut D,
         322  +
    pub fn deserialize(
         323  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  320    324   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  321    325   
        #[allow(unused_variables, unused_mut)]
  322    326   
        let mut builder = Self::builder();
  323    327   
        #[allow(
  324    328   
            unused_variables,
  325    329   
            unreachable_code,
  326    330   
            clippy::single_match,
  327    331   
            clippy::match_single_binding,
  328    332   
            clippy::diverging_sub_expression
  329    333   
        )]
  330         -
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, (), |_, member, deser| {
         334  +
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
  331    335   
            match member.member_index() {
  332    336   
                Some(0) => {
  333    337   
                    builder.request_id = Some(deser.read_string(member)?);
  334    338   
                }
  335    339   
                Some(1) => {
  336    340   
                    builder.language_code = Some(crate::types::LanguageCode::from(deser.read_string(member)?.as_str()));
  337    341   
                }
  338    342   
                Some(2) => {
  339    343   
                    builder.media_sample_rate_hertz = Some(deser.read_integer(member)?);
  340    344   
                }
  341    345   
                Some(3) => {
  342    346   
                    builder.media_encoding = Some(crate::types::MediaEncoding::from(deser.read_string(member)?.as_str()));
  343    347   
                }
  344    348   
                Some(4) => {
  345    349   
                    builder.vocabulary_name = Some(deser.read_string(member)?);
  346    350   
                }
  347    351   
                Some(5) => {
  348    352   
                    builder.specialty = Some(crate::types::Specialty::from(deser.read_string(member)?.as_str()));
  349    353   
                }
  350    354   
                Some(6) => {
  351    355   
                    builder.r#type = Some(crate::types::Type::from(deser.read_string(member)?.as_str()));
  352    356   
                }
  353    357   
                Some(7) => {
  354    358   
                    builder.show_speaker_label = Some(deser.read_boolean(member)?);
  355    359   
                }
  356    360   
                Some(8) => {
  357    361   
                    builder.session_id = Some(deser.read_string(member)?);
  358    362   
                }
  359    363   
                Some(9) => {
  360    364   
                    builder.transcript_result_stream = Some({
  361    365   
                        let _ = member;
  362         -
                        todo!("deserialize aggregate")
         366  +
                        todo!("deserialize streaming union")
  363    367   
                    });
  364    368   
                }
  365    369   
                Some(10) => {
  366    370   
                    builder.enable_channel_identification = Some(deser.read_boolean(member)?);
  367    371   
                }
  368    372   
                Some(11) => {
  369    373   
                    builder.number_of_channels = Some(deser.read_integer(member)?);
  370    374   
                }
  371    375   
                Some(12) => {
  372    376   
                    builder.content_identification_type =
  373    377   
                        Some(crate::types::MedicalContentIdentificationType::from(deser.read_string(member)?.as_str()));
  374    378   
                }
         379  +
                Some(13) => {
         380  +
                    builder._request_id = Some(deser.read_string(member)?);
         381  +
                }
         382  +
                _ => {}
         383  +
            }
         384  +
            Ok(())
         385  +
        })?;
         386  +
        builder
         387  +
            .build()
         388  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         389  +
    }
         390  +
}
         391  +
impl StartMedicalStreamTranscriptionOutput {
         392  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         393  +
    /// Header-bound members are read directly from headers, avoiding runtime
         394  +
    /// member iteration overhead. Body members are read via the deserializer.
         395  +
    pub fn deserialize_with_response(
         396  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         397  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         398  +
        _status: u16,
         399  +
        _body: &[u8],
         400  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         401  +
        #[allow(unused_variables, unused_mut)]
         402  +
        let mut builder = Self::builder();
         403  +
        if let Some(val) = headers.get("x-amzn-request-id") {
         404  +
            builder.request_id = Some(val.to_string());
         405  +
        }
         406  +
        if let Some(val) = headers.get("x-amzn-transcribe-language-code") {
         407  +
            builder.language_code = Some(crate::types::LanguageCode::from(val));
         408  +
        }
         409  +
        if let Some(val) = headers.get("x-amzn-transcribe-sample-rate") {
         410  +
            builder.media_sample_rate_hertz = val.parse::<i32>().ok();
         411  +
        }
         412  +
        if let Some(val) = headers.get("x-amzn-transcribe-media-encoding") {
         413  +
            builder.media_encoding = Some(crate::types::MediaEncoding::from(val));
         414  +
        }
         415  +
        if let Some(val) = headers.get("x-amzn-transcribe-vocabulary-name") {
         416  +
            builder.vocabulary_name = Some(val.to_string());
         417  +
        }
         418  +
        if let Some(val) = headers.get("x-amzn-transcribe-specialty") {
         419  +
            builder.specialty = Some(crate::types::Specialty::from(val));
         420  +
        }
         421  +
        if let Some(val) = headers.get("x-amzn-transcribe-type") {
         422  +
            builder.r#type = Some(crate::types::Type::from(val));
         423  +
        }
         424  +
        if let Some(val) = headers.get("x-amzn-transcribe-show-speaker-label") {
         425  +
            builder.show_speaker_label = val.parse::<bool>().ok();
         426  +
        }
         427  +
        if let Some(val) = headers.get("x-amzn-transcribe-session-id") {
         428  +
            builder.session_id = Some(val.to_string());
         429  +
        }
         430  +
        if let Some(val) = headers.get("x-amzn-transcribe-enable-channel-identification") {
         431  +
            builder.enable_channel_identification = val.parse::<bool>().ok();
         432  +
        }
         433  +
        if let Some(val) = headers.get("x-amzn-transcribe-number-of-channels") {
         434  +
            builder.number_of_channels = val.parse::<i32>().ok();
         435  +
        }
         436  +
        if let Some(val) = headers.get("x-amzn-transcribe-content-identification-type") {
         437  +
            builder.content_identification_type = Some(crate::types::MedicalContentIdentificationType::from(val));
         438  +
        }
         439  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         440  +
            builder._request_id = Some(val.to_string());
         441  +
        }
         442  +
        #[allow(
         443  +
            unused_variables,
         444  +
            unreachable_code,
         445  +
            clippy::single_match,
         446  +
            clippy::match_single_binding,
         447  +
            clippy::diverging_sub_expression
         448  +
        )]
         449  +
        deserializer.read_struct(&STARTMEDICALSTREAMTRANSCRIPTIONOUTPUT_SCHEMA, &mut |member, deser| {
         450  +
            match member.member_index() {
         451  +
                Some(0) => { /* read from headers above */ }
         452  +
                Some(1) => { /* read from headers above */ }
         453  +
                Some(2) => { /* read from headers above */ }
         454  +
                Some(3) => { /* read from headers above */ }
         455  +
                Some(4) => { /* read from headers above */ }
         456  +
                Some(5) => { /* read from headers above */ }
         457  +
                Some(6) => { /* read from headers above */ }
         458  +
                Some(7) => { /* read from headers above */ }
         459  +
                Some(8) => { /* read from headers above */ }
         460  +
                Some(9) => {
         461  +
                    builder.transcript_result_stream = Some({
         462  +
                        let _ = member;
         463  +
                        todo!("deserialize streaming union")
         464  +
                    });
         465  +
                }
         466  +
                Some(10) => { /* read from headers above */ }
         467  +
                Some(11) => { /* read from headers above */ }
         468  +
                Some(12) => { /* read from headers above */ }
  375    469   
                _ => {}
  376    470   
            }
  377    471   
            Ok(())
  378    472   
        })?;
  379    473   
        builder
  380    474   
            .build()
  381    475   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  382    476   
    }
  383    477   
}
  384    478   
impl ::aws_types::request_id::RequestId for StartMedicalStreamTranscriptionOutput {