AWS SDK for C++

AWS SDK for C++ Version 1.11.875

Loading...
Searching...
No Matches
StartStreamTranscriptionRequest.h
1
6#pragma once
7#include <aws/core/utils/event/EventStreamDecoder.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/transcribestreaming/TranscribeStreamingServiceRequest.h>
10#include <aws/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
11#include <aws/transcribestreaming/model/AudioStream.h>
12#include <aws/transcribestreaming/model/ContentIdentificationType.h>
13#include <aws/transcribestreaming/model/ContentRedactionType.h>
14#include <aws/transcribestreaming/model/LanguageCode.h>
15#include <aws/transcribestreaming/model/MediaEncoding.h>
16#include <aws/transcribestreaming/model/PartialResultsStability.h>
17#include <aws/transcribestreaming/model/StartStreamTranscriptionHandler.h>
18#include <aws/transcribestreaming/model/TranscriptFormat.h>
19#include <aws/transcribestreaming/model/VocabularyFilterMethod.h>
20
21#include <memory>
22#include <utility>
23
24namespace Aws {
25namespace TranscribeStreamingService {
26namespace Model {
27
31 public:
32 AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "StartStreamTranscription"; }
39
40 inline virtual bool IsEventStreamRequest() const override { return true; }
41 inline virtual bool HasEventStreamResponse() const override { return true; }
42 // SerializePayload will not be invoked.
43 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
44 AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String SerializePayload() const override { return {}; }
45 AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr<Aws::IOStream> GetBody() const override;
46 AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
47
52
57
62 m_handler = value;
63 m_decoder.ResetEventStreamHandler(&m_handler);
64 }
65
71 return *this;
72 }
73
75
84 inline LanguageCode GetLanguageCode() const { return m_languageCode; }
85 inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
86 inline void SetLanguageCode(LanguageCode value) {
87 m_languageCodeHasBeenSet = true;
88 m_languageCode = value;
89 }
91 SetLanguageCode(value);
92 return *this;
93 }
95
97
103 inline int GetMediaSampleRateHertz() const { return m_mediaSampleRateHertz; }
104 inline bool MediaSampleRateHertzHasBeenSet() const { return m_mediaSampleRateHertzHasBeenSet; }
105 inline void SetMediaSampleRateHertz(int value) {
106 m_mediaSampleRateHertzHasBeenSet = true;
107 m_mediaSampleRateHertz = value;
108 }
111 return *this;
112 }
114
116
124 inline MediaEncoding GetMediaEncoding() const { return m_mediaEncoding; }
125 inline bool MediaEncodingHasBeenSet() const { return m_mediaEncodingHasBeenSet; }
126 inline void SetMediaEncoding(MediaEncoding value) {
127 m_mediaEncodingHasBeenSet = true;
128 m_mediaEncoding = value;
129 }
131 SetMediaEncoding(value);
132 return *this;
133 }
135
137
151 inline const Aws::String& GetVocabularyName() const { return m_vocabularyName; }
152 inline bool VocabularyNameHasBeenSet() const { return m_vocabularyNameHasBeenSet; }
153 template <typename VocabularyNameT = Aws::String>
154 void SetVocabularyName(VocabularyNameT&& value) {
155 m_vocabularyNameHasBeenSet = true;
156 m_vocabularyName = std::forward<VocabularyNameT>(value);
157 }
158 template <typename VocabularyNameT = Aws::String>
160 SetVocabularyName(std::forward<VocabularyNameT>(value));
161 return *this;
162 }
164
166
171 inline const Aws::String& GetSessionId() const { return m_sessionId; }
172 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
173 template <typename SessionIdT = Aws::String>
174 void SetSessionId(SessionIdT&& value) {
175 m_sessionIdHasBeenSet = true;
176 m_sessionId = std::forward<SessionIdT>(value);
177 }
178 template <typename SessionIdT = Aws::String>
180 SetSessionId(std::forward<SessionIdT>(value));
181 return *this;
182 }
184
186
192 AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr<AudioStream> GetAudioStream() const { return m_audioStream; }
193 AWS_TRANSCRIBESTREAMINGSERVICE_API void SetAudioStream(const std::shared_ptr<AudioStream>& value) {
194 m_audioStreamHasBeenSet = true;
195 m_audioStream = value;
196 }
197 AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest& WithAudioStream(const std::shared_ptr<AudioStream>& value) {
198 SetAudioStream(value);
199 return *this;
200 }
201
203
205
219 inline const Aws::String& GetVocabularyFilterName() const { return m_vocabularyFilterName; }
220 inline bool VocabularyFilterNameHasBeenSet() const { return m_vocabularyFilterNameHasBeenSet; }
221 template <typename VocabularyFilterNameT = Aws::String>
222 void SetVocabularyFilterName(VocabularyFilterNameT&& value) {
223 m_vocabularyFilterNameHasBeenSet = true;
224 m_vocabularyFilterName = std::forward<VocabularyFilterNameT>(value);
225 }
226 template <typename VocabularyFilterNameT = Aws::String>
228 SetVocabularyFilterName(std::forward<VocabularyFilterNameT>(value));
229 return *this;
230 }
232
234
240 inline VocabularyFilterMethod GetVocabularyFilterMethod() const { return m_vocabularyFilterMethod; }
241 inline bool VocabularyFilterMethodHasBeenSet() const { return m_vocabularyFilterMethodHasBeenSet; }
243 m_vocabularyFilterMethodHasBeenSet = true;
244 m_vocabularyFilterMethod = value;
245 }
248 return *this;
249 }
251
253
260 inline bool GetShowSpeakerLabel() const { return m_showSpeakerLabel; }
261 inline bool ShowSpeakerLabelHasBeenSet() const { return m_showSpeakerLabelHasBeenSet; }
262 inline void SetShowSpeakerLabel(bool value) {
263 m_showSpeakerLabelHasBeenSet = true;
264 m_showSpeakerLabel = value;
265 }
267 SetShowSpeakerLabel(value);
268 return *this;
269 }
271
273
285 inline bool GetEnableChannelIdentification() const { return m_enableChannelIdentification; }
286 inline bool EnableChannelIdentificationHasBeenSet() const { return m_enableChannelIdentificationHasBeenSet; }
287 inline void SetEnableChannelIdentification(bool value) {
288 m_enableChannelIdentificationHasBeenSet = true;
289 m_enableChannelIdentification = value;
290 }
293 return *this;
294 }
296
298
305 inline int GetNumberOfChannels() const { return m_numberOfChannels; }
306 inline bool NumberOfChannelsHasBeenSet() const { return m_numberOfChannelsHasBeenSet; }
307 inline void SetNumberOfChannels(int value) {
308 m_numberOfChannelsHasBeenSet = true;
309 m_numberOfChannels = value;
310 }
312 SetNumberOfChannels(value);
313 return *this;
314 }
316
318
325 inline bool GetEnablePartialResultsStabilization() const { return m_enablePartialResultsStabilization; }
326 inline bool EnablePartialResultsStabilizationHasBeenSet() const { return m_enablePartialResultsStabilizationHasBeenSet; }
327 inline void SetEnablePartialResultsStabilization(bool value) {
328 m_enablePartialResultsStabilizationHasBeenSet = true;
329 m_enablePartialResultsStabilization = value;
330 }
333 return *this;
334 }
336
338
346 inline PartialResultsStability GetPartialResultsStability() const { return m_partialResultsStability; }
347 inline bool PartialResultsStabilityHasBeenSet() const { return m_partialResultsStabilityHasBeenSet; }
349 m_partialResultsStabilityHasBeenSet = true;
350 m_partialResultsStability = value;
351 }
354 return *this;
355 }
357
359
371 inline ContentIdentificationType GetContentIdentificationType() const { return m_contentIdentificationType; }
372 inline bool ContentIdentificationTypeHasBeenSet() const { return m_contentIdentificationTypeHasBeenSet; }
374 m_contentIdentificationTypeHasBeenSet = true;
375 m_contentIdentificationType = value;
376 }
379 return *this;
380 }
382
384
396 inline ContentRedactionType GetContentRedactionType() const { return m_contentRedactionType; }
397 inline bool ContentRedactionTypeHasBeenSet() const { return m_contentRedactionTypeHasBeenSet; }
399 m_contentRedactionTypeHasBeenSet = true;
400 m_contentRedactionType = value;
401 }
404 return *this;
405 }
407
409
427 inline const Aws::String& GetPiiEntityTypes() const { return m_piiEntityTypes; }
428 inline bool PiiEntityTypesHasBeenSet() const { return m_piiEntityTypesHasBeenSet; }
429 template <typename PiiEntityTypesT = Aws::String>
430 void SetPiiEntityTypes(PiiEntityTypesT&& value) {
431 m_piiEntityTypesHasBeenSet = true;
432 m_piiEntityTypes = std::forward<PiiEntityTypesT>(value);
433 }
434 template <typename PiiEntityTypesT = Aws::String>
436 SetPiiEntityTypes(std::forward<PiiEntityTypesT>(value));
437 return *this;
438 }
440
442
452 inline const Aws::String& GetLanguageModelName() const { return m_languageModelName; }
453 inline bool LanguageModelNameHasBeenSet() const { return m_languageModelNameHasBeenSet; }
454 template <typename LanguageModelNameT = Aws::String>
455 void SetLanguageModelName(LanguageModelNameT&& value) {
456 m_languageModelNameHasBeenSet = true;
457 m_languageModelName = std::forward<LanguageModelNameT>(value);
458 }
459 template <typename LanguageModelNameT = Aws::String>
461 SetLanguageModelName(std::forward<LanguageModelNameT>(value));
462 return *this;
463 }
465
467
483 inline bool GetIdentifyLanguage() const { return m_identifyLanguage; }
484 inline bool IdentifyLanguageHasBeenSet() const { return m_identifyLanguageHasBeenSet; }
485 inline void SetIdentifyLanguage(bool value) {
486 m_identifyLanguageHasBeenSet = true;
487 m_identifyLanguage = value;
488 }
490 SetIdentifyLanguage(value);
491 return *this;
492 }
494
496
509 inline const Aws::String& GetLanguageOptions() const { return m_languageOptions; }
510 inline bool LanguageOptionsHasBeenSet() const { return m_languageOptionsHasBeenSet; }
511 template <typename LanguageOptionsT = Aws::String>
512 void SetLanguageOptions(LanguageOptionsT&& value) {
513 m_languageOptionsHasBeenSet = true;
514 m_languageOptions = std::forward<LanguageOptionsT>(value);
515 }
516 template <typename LanguageOptionsT = Aws::String>
518 SetLanguageOptions(std::forward<LanguageOptionsT>(value));
519 return *this;
520 }
522
524
530 inline LanguageCode GetPreferredLanguage() const { return m_preferredLanguage; }
531 inline bool PreferredLanguageHasBeenSet() const { return m_preferredLanguageHasBeenSet; }
533 m_preferredLanguageHasBeenSet = true;
534 m_preferredLanguage = value;
535 }
538 return *this;
539 }
541
543
557 inline bool GetIdentifyMultipleLanguages() const { return m_identifyMultipleLanguages; }
558 inline bool IdentifyMultipleLanguagesHasBeenSet() const { return m_identifyMultipleLanguagesHasBeenSet; }
559 inline void SetIdentifyMultipleLanguages(bool value) {
560 m_identifyMultipleLanguagesHasBeenSet = true;
561 m_identifyMultipleLanguages = value;
562 }
565 return *this;
566 }
568
570
583 inline const Aws::String& GetVocabularyNames() const { return m_vocabularyNames; }
584 inline bool VocabularyNamesHasBeenSet() const { return m_vocabularyNamesHasBeenSet; }
585 template <typename VocabularyNamesT = Aws::String>
586 void SetVocabularyNames(VocabularyNamesT&& value) {
587 m_vocabularyNamesHasBeenSet = true;
588 m_vocabularyNames = std::forward<VocabularyNamesT>(value);
589 }
590 template <typename VocabularyNamesT = Aws::String>
592 SetVocabularyNames(std::forward<VocabularyNamesT>(value));
593 return *this;
594 }
596
598
612 inline const Aws::String& GetVocabularyFilterNames() const { return m_vocabularyFilterNames; }
613 inline bool VocabularyFilterNamesHasBeenSet() const { return m_vocabularyFilterNamesHasBeenSet; }
614 template <typename VocabularyFilterNamesT = Aws::String>
615 void SetVocabularyFilterNames(VocabularyFilterNamesT&& value) {
616 m_vocabularyFilterNamesHasBeenSet = true;
617 m_vocabularyFilterNames = std::forward<VocabularyFilterNamesT>(value);
618 }
619 template <typename VocabularyFilterNamesT = Aws::String>
621 SetVocabularyFilterNames(std::forward<VocabularyFilterNamesT>(value));
622 return *this;
623 }
625
627
635 inline int GetSessionResumeWindow() const { return m_sessionResumeWindow; }
636 inline bool SessionResumeWindowHasBeenSet() const { return m_sessionResumeWindowHasBeenSet; }
637 inline void SetSessionResumeWindow(int value) {
638 m_sessionResumeWindowHasBeenSet = true;
639 m_sessionResumeWindow = value;
640 }
643 return *this;
644 }
646
648
658 inline TranscriptFormat GetTranscriptFormat() const { return m_transcriptFormat; }
659 inline bool TranscriptFormatHasBeenSet() const { return m_transcriptFormatHasBeenSet; }
661 m_transcriptFormatHasBeenSet = true;
662 m_transcriptFormat = value;
663 }
665 SetTranscriptFormat(value);
666 return *this;
667 }
669 private:
670 LanguageCode m_languageCode{LanguageCode::NOT_SET};
671
672 int m_mediaSampleRateHertz{0};
673
674 MediaEncoding m_mediaEncoding{MediaEncoding::NOT_SET};
675
676 Aws::String m_vocabularyName;
677
678 Aws::String m_sessionId;
679
680 std::shared_ptr<AudioStream> m_audioStream;
681
682 Aws::String m_vocabularyFilterName;
683
685
686 bool m_showSpeakerLabel{false};
687
688 bool m_enableChannelIdentification{false};
689
690 int m_numberOfChannels{0};
691
692 bool m_enablePartialResultsStabilization{false};
693
695
697
699
700 Aws::String m_piiEntityTypes;
701
702 Aws::String m_languageModelName;
703
704 bool m_identifyLanguage{false};
705
706 Aws::String m_languageOptions;
707
708 LanguageCode m_preferredLanguage{LanguageCode::NOT_SET};
709
710 bool m_identifyMultipleLanguages{false};
711
712 Aws::String m_vocabularyNames;
713
714 Aws::String m_vocabularyFilterNames;
715
716 int m_sessionResumeWindow{0};
717
719 StartStreamTranscriptionHandler m_handler;
720 Aws::Utils::Event::EventStreamDecoder m_decoder{Utils::Event::EventStreamDecoder(&m_handler)};
721
722 bool m_languageCodeHasBeenSet = false;
723 bool m_mediaSampleRateHertzHasBeenSet = false;
724 bool m_mediaEncodingHasBeenSet = false;
725 bool m_vocabularyNameHasBeenSet = false;
726 bool m_sessionIdHasBeenSet = false;
727 bool m_audioStreamHasBeenSet = false;
728 bool m_vocabularyFilterNameHasBeenSet = false;
729 bool m_vocabularyFilterMethodHasBeenSet = false;
730 bool m_showSpeakerLabelHasBeenSet = false;
731 bool m_enableChannelIdentificationHasBeenSet = false;
732 bool m_numberOfChannelsHasBeenSet = false;
733 bool m_enablePartialResultsStabilizationHasBeenSet = false;
734 bool m_partialResultsStabilityHasBeenSet = false;
735 bool m_contentIdentificationTypeHasBeenSet = false;
736 bool m_contentRedactionTypeHasBeenSet = false;
737 bool m_piiEntityTypesHasBeenSet = false;
738 bool m_languageModelNameHasBeenSet = false;
739 bool m_identifyLanguageHasBeenSet = false;
740 bool m_languageOptionsHasBeenSet = false;
741 bool m_preferredLanguageHasBeenSet = false;
742 bool m_identifyMultipleLanguagesHasBeenSet = false;
743 bool m_vocabularyNamesHasBeenSet = false;
744 bool m_vocabularyFilterNamesHasBeenSet = false;
745 bool m_sessionResumeWindowHasBeenSet = false;
746 bool m_transcriptFormatHasBeenSet = false;
747};
748
749} // namespace Model
750} // namespace TranscribeStreamingService
751} // namespace Aws
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
StartStreamTranscriptionRequest & WithVocabularyFilterNames(VocabularyFilterNamesT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest & WithAudioStream(const std::shared_ptr< AudioStream > &value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionRequest()=default
StartStreamTranscriptionRequest & WithPiiEntityTypes(PiiEntityTypesT &&value)
StartStreamTranscriptionRequest & WithContentIdentificationType(ContentIdentificationType value)
StartStreamTranscriptionRequest & WithContentRedactionType(ContentRedactionType value)
StartStreamTranscriptionRequest & WithPartialResultsStability(PartialResultsStability value)
StartStreamTranscriptionRequest & WithVocabularyNames(VocabularyNamesT &&value)
StartStreamTranscriptionRequest & WithLanguageModelName(LanguageModelNameT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String SerializePayload() const override
AWS_TRANSCRIBESTREAMINGSERVICE_API void SetAudioStream(const std::shared_ptr< AudioStream > &value)
StartStreamTranscriptionRequest & WithEventStreamHandler(const StartStreamTranscriptionHandler &value)
StartStreamTranscriptionRequest & WithVocabularyName(VocabularyNameT &&value)
StartStreamTranscriptionRequest & WithTranscriptFormat(TranscriptFormat value)
AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr< Aws::IOStream > GetBody() const override
StartStreamTranscriptionRequest & WithVocabularyFilterMethod(VocabularyFilterMethod value)
StartStreamTranscriptionRequest & WithVocabularyFilterName(VocabularyFilterNameT &&value)
AWS_TRANSCRIBESTREAMINGSERVICE_API std::shared_ptr< AudioStream > GetAudioStream() const
StartStreamTranscriptionRequest & WithLanguageOptions(LanguageOptionsT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String