AWS SDK for C++

AWS SDK for C++ Version 1.11.818

Loading...
Searching...
No Matches
MedicalScribeInputStream.h
1
6#pragma once
7#include <aws/core/utils/event/EventStream.h>
8#include <aws/core/utils/stream/HttpWriteDataStreamBuf.h>
9#include <aws/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
10#include <aws/transcribestreaming/model/MedicalScribeAudioEvent.h>
11#include <aws/transcribestreaming/model/MedicalScribeConfigurationEvent.h>
12#include <aws/transcribestreaming/model/MedicalScribeSessionControlEvent.h>
13
14#include <utility>
15
16namespace Aws {
17namespace TranscribeStreamingService {
18namespace Model {
19
31class AWS_TRANSCRIBESTREAMINGSERVICE_API MedicalScribeInputStream : public Aws::Utils::Event::EventEncoderStream {
32 public:
34 explicit MedicalScribeInputStream(std::shared_ptr<Aws::Utils::Stream::HttpWriteDataStreamBuf> streambuf)
35 : Aws::Utils::Event::EventEncoderStream(std::move(streambuf)) {}
38 if (!value.GetAudioChunk().empty()) {
39 msg.InsertEventHeader(":message-type", Aws::String("event"));
40 msg.InsertEventHeader(":event-type", Aws::String("AudioEvent"));
41 msg.InsertEventHeader(":content-type", Aws::String("application/octet-stream"));
43 }
44 WriteEvent(msg);
45 return *this;
46 }
49 msg.InsertEventHeader(":message-type", Aws::String("event"));
50 msg.InsertEventHeader(":event-type", Aws::String("SessionControlEvent"));
51 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
53 WriteEvent(msg);
54 return *this;
55 }
58 msg.InsertEventHeader(":message-type", Aws::String("event"));
59 msg.InsertEventHeader(":event-type", Aws::String("ConfigurationEvent"));
60 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
62 WriteEvent(msg);
63 return *this;
64 }
65};
66
67} // namespace Model
68} // namespace TranscribeStreamingService
69} // namespace Aws
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
MedicalScribeInputStream(std::shared_ptr< Aws::Utils::Stream::HttpWriteDataStreamBuf > streambuf)
MedicalScribeInputStream & WriteMedicalScribeSessionControlEvent(const MedicalScribeSessionControlEvent &value)
MedicalScribeInputStream & WriteMedicalScribeConfigurationEvent(const MedicalScribeConfigurationEvent &value)
MedicalScribeInputStream & WriteMedicalScribeAudioEvent(const MedicalScribeAudioEvent &value)
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
void WriteEventPayload(const unsigned char *data, size_t length)
void InsertEventHeader(const Aws::String &headerName, const EventHeaderValue &eventHeaderValue)
Aws::String WriteCompact(bool treatAsObject=true) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String