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