AWS SDK for C++

AWS SDK for C++ Version 1.11.820

Loading...
Searching...
No Matches
StartConversationRequestEventStream.h
1
6#pragma once
7#include <aws/core/utils/event/EventStream.h>
8#include <aws/core/utils/stream/HttpWriteDataStreamBuf.h>
9#include <aws/lexv2-runtime/LexRuntimeV2_EXPORTS.h>
10#include <aws/lexv2-runtime/model/AudioInputEvent.h>
11#include <aws/lexv2-runtime/model/ConfigurationEvent.h>
12#include <aws/lexv2-runtime/model/DTMFInputEvent.h>
13#include <aws/lexv2-runtime/model/DisconnectionEvent.h>
14#include <aws/lexv2-runtime/model/PlaybackCompletionEvent.h>
15#include <aws/lexv2-runtime/model/TextInputEvent.h>
16
17#include <utility>
18
19namespace Aws {
20namespace LexRuntimeV2 {
21namespace Model {
22
30 public:
32 explicit StartConversationRequestEventStream(std::shared_ptr<Aws::Utils::Stream::HttpWriteDataStreamBuf> streambuf)
33 : Aws::Utils::Event::EventEncoderStream(std::move(streambuf)) {}
36 msg.InsertEventHeader(":message-type", Aws::String("event"));
37 msg.InsertEventHeader(":event-type", Aws::String("ConfigurationEvent"));
38 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
40 WriteEvent(msg);
41 return *this;
42 }
45 msg.InsertEventHeader(":message-type", Aws::String("event"));
46 msg.InsertEventHeader(":event-type", Aws::String("AudioInputEvent"));
47 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
49 WriteEvent(msg);
50 return *this;
51 }
54 msg.InsertEventHeader(":message-type", Aws::String("event"));
55 msg.InsertEventHeader(":event-type", Aws::String("DTMFInputEvent"));
56 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
58 WriteEvent(msg);
59 return *this;
60 }
63 msg.InsertEventHeader(":message-type", Aws::String("event"));
64 msg.InsertEventHeader(":event-type", Aws::String("TextInputEvent"));
65 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
67 WriteEvent(msg);
68 return *this;
69 }
72 msg.InsertEventHeader(":message-type", Aws::String("event"));
73 msg.InsertEventHeader(":event-type", Aws::String("PlaybackCompletionEvent"));
74 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
76 WriteEvent(msg);
77 return *this;
78 }
81 msg.InsertEventHeader(":message-type", Aws::String("event"));
82 msg.InsertEventHeader(":event-type", Aws::String("DisconnectionEvent"));
83 msg.InsertEventHeader(":content-type", Aws::String("application/json"));
85 WriteEvent(msg);
86 return *this;
87 }
88};
89
90} // namespace Model
91} // namespace LexRuntimeV2
92} // namespace Aws
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LEXRUNTIMEV2_API Aws::Utils::Json::JsonValue Jsonize() const
StartConversationRequestEventStream & WritePlaybackCompletionEvent(const PlaybackCompletionEvent &value)
StartConversationRequestEventStream(std::shared_ptr< Aws::Utils::Stream::HttpWriteDataStreamBuf > streambuf)
StartConversationRequestEventStream & WriteTextInputEvent(const TextInputEvent &value)
StartConversationRequestEventStream & WriteAudioInputEvent(const AudioInputEvent &value)
StartConversationRequestEventStream & WriteDTMFInputEvent(const DTMFInputEvent &value)
StartConversationRequestEventStream & WriteConfigurationEvent(const ConfigurationEvent &value)
StartConversationRequestEventStream & WriteDisconnectionEvent(const DisconnectionEvent &value)
AWS_LEXRUNTIMEV2_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