AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
StartConversationRequest.h
1
6#pragma once
7#include <aws/lexv2-runtime/LexRuntimeV2_EXPORTS.h>
8#include <aws/lexv2-runtime/LexRuntimeV2Request.h>
9#include <aws/lexv2-runtime/model/StartConversationHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <memory>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/lexv2-runtime/model/ConversationMode.h>
14#include <aws/lexv2-runtime/model/StartConversationRequestEventStream.h>
15#include <utility>
16
17namespace Aws
18{
19namespace LexRuntimeV2
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_LEXRUNTIMEV2_API StartConversationRequest();
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "StartConversation"; }
36
37 inline virtual bool IsEventStreamRequest() const override { return true; }
38 // SerializePayload will not be invoked.
39 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
40 AWS_LEXRUNTIMEV2_API Aws::String SerializePayload() const override { return {}; }
41 AWS_LEXRUNTIMEV2_API std::shared_ptr<Aws::IOStream> GetBody() const override;
42 AWS_LEXRUNTIMEV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
43
48
52 inline const StartConversationHandler& GetEventStreamHandler() const { return m_handler; }
53
57 inline void SetEventStreamHandler(const StartConversationHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
58
63
64
66
69 inline const Aws::String& GetBotId() const{ return m_botId; }
70 inline bool BotIdHasBeenSet() const { return m_botIdHasBeenSet; }
71 inline void SetBotId(const Aws::String& value) { m_botIdHasBeenSet = true; m_botId = value; }
72 inline void SetBotId(Aws::String&& value) { m_botIdHasBeenSet = true; m_botId = std::move(value); }
73 inline void SetBotId(const char* value) { m_botIdHasBeenSet = true; m_botId.assign(value); }
74 inline StartConversationRequest& WithBotId(const Aws::String& value) { SetBotId(value); return *this;}
75 inline StartConversationRequest& WithBotId(Aws::String&& value) { SetBotId(std::move(value)); return *this;}
76 inline StartConversationRequest& WithBotId(const char* value) { SetBotId(value); return *this;}
78
80
83 inline const Aws::String& GetBotAliasId() const{ return m_botAliasId; }
84 inline bool BotAliasIdHasBeenSet() const { return m_botAliasIdHasBeenSet; }
85 inline void SetBotAliasId(const Aws::String& value) { m_botAliasIdHasBeenSet = true; m_botAliasId = value; }
86 inline void SetBotAliasId(Aws::String&& value) { m_botAliasIdHasBeenSet = true; m_botAliasId = std::move(value); }
87 inline void SetBotAliasId(const char* value) { m_botAliasIdHasBeenSet = true; m_botAliasId.assign(value); }
88 inline StartConversationRequest& WithBotAliasId(const Aws::String& value) { SetBotAliasId(value); return *this;}
89 inline StartConversationRequest& WithBotAliasId(Aws::String&& value) { SetBotAliasId(std::move(value)); return *this;}
90 inline StartConversationRequest& WithBotAliasId(const char* value) { SetBotAliasId(value); return *this;}
92
94
97 inline const Aws::String& GetLocaleId() const{ return m_localeId; }
98 inline bool LocaleIdHasBeenSet() const { return m_localeIdHasBeenSet; }
99 inline void SetLocaleId(const Aws::String& value) { m_localeIdHasBeenSet = true; m_localeId = value; }
100 inline void SetLocaleId(Aws::String&& value) { m_localeIdHasBeenSet = true; m_localeId = std::move(value); }
101 inline void SetLocaleId(const char* value) { m_localeIdHasBeenSet = true; m_localeId.assign(value); }
102 inline StartConversationRequest& WithLocaleId(const Aws::String& value) { SetLocaleId(value); return *this;}
103 inline StartConversationRequest& WithLocaleId(Aws::String&& value) { SetLocaleId(std::move(value)); return *this;}
104 inline StartConversationRequest& WithLocaleId(const char* value) { SetLocaleId(value); return *this;}
106
108
111 inline const Aws::String& GetSessionId() const{ return m_sessionId; }
112 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
113 inline void SetSessionId(const Aws::String& value) { m_sessionIdHasBeenSet = true; m_sessionId = value; }
114 inline void SetSessionId(Aws::String&& value) { m_sessionIdHasBeenSet = true; m_sessionId = std::move(value); }
115 inline void SetSessionId(const char* value) { m_sessionIdHasBeenSet = true; m_sessionId.assign(value); }
116 inline StartConversationRequest& WithSessionId(const Aws::String& value) { SetSessionId(value); return *this;}
117 inline StartConversationRequest& WithSessionId(Aws::String&& value) { SetSessionId(std::move(value)); return *this;}
118 inline StartConversationRequest& WithSessionId(const char* value) { SetSessionId(value); return *this;}
120
122
127 inline const ConversationMode& GetConversationMode() const{ return m_conversationMode; }
128 inline bool ConversationModeHasBeenSet() const { return m_conversationModeHasBeenSet; }
129 inline void SetConversationMode(const ConversationMode& value) { m_conversationModeHasBeenSet = true; m_conversationMode = value; }
130 inline void SetConversationMode(ConversationMode&& value) { m_conversationModeHasBeenSet = true; m_conversationMode = std::move(value); }
132 inline StartConversationRequest& WithConversationMode(ConversationMode&& value) { SetConversationMode(std::move(value)); return *this;}
134
136
140 AWS_LEXRUNTIMEV2_API std::shared_ptr<StartConversationRequestEventStream> GetRequestEventStream() const { return m_requestEventStream; }
141 AWS_LEXRUNTIMEV2_API void SetRequestEventStream(const std::shared_ptr<StartConversationRequestEventStream>& value) { m_requestEventStream = value; }
142 AWS_LEXRUNTIMEV2_API StartConversationRequest& WithRequestEventStream(const std::shared_ptr<StartConversationRequestEventStream>& value) { SetRequestEventStream(value); return *this;}
143
145 private:
146
147 Aws::String m_botId;
148 bool m_botIdHasBeenSet = false;
149
150 Aws::String m_botAliasId;
151 bool m_botAliasIdHasBeenSet = false;
152
153 Aws::String m_localeId;
154 bool m_localeIdHasBeenSet = false;
155
156 Aws::String m_sessionId;
157 bool m_sessionIdHasBeenSet = false;
158
159 ConversationMode m_conversationMode;
160 bool m_conversationModeHasBeenSet = false;
161
162 std::shared_ptr<StartConversationRequestEventStream> m_requestEventStream;
163 StartConversationHandler m_handler;
165
166 };
167
168} // namespace Model
169} // namespace LexRuntimeV2
170} // namespace Aws
AWS_LEXRUNTIMEV2_API void SetRequestEventStream(const std::shared_ptr< StartConversationRequestEventStream > &value)
StartConversationRequest & WithBotId(const Aws::String &value)
StartConversationRequest & WithSessionId(const Aws::String &value)
StartConversationRequest & WithLocaleId(Aws::String &&value)
AWS_LEXRUNTIMEV2_API std::shared_ptr< Aws::IOStream > GetBody() const override
StartConversationRequest & WithBotAliasId(const Aws::String &value)
StartConversationRequest & WithEventStreamHandler(const StartConversationHandler &value)
AWS_LEXRUNTIMEV2_API std::shared_ptr< StartConversationRequestEventStream > GetRequestEventStream() const
StartConversationRequest & WithBotId(Aws::String &&value)
AWS_LEXRUNTIMEV2_API StartConversationRequest & WithRequestEventStream(const std::shared_ptr< StartConversationRequestEventStream > &value)
StartConversationRequest & WithBotId(const char *value)
StartConversationRequest & WithLocaleId(const char *value)
virtual const char * GetServiceRequestName() const override
StartConversationRequest & WithBotAliasId(Aws::String &&value)
StartConversationRequest & WithSessionId(Aws::String &&value)
StartConversationRequest & WithSessionId(const char *value)
AWS_LEXRUNTIMEV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
StartConversationRequest & WithLocaleId(const Aws::String &value)
void SetEventStreamHandler(const StartConversationHandler &value)
StartConversationRequest & WithBotAliasId(const char *value)
AWS_LEXRUNTIMEV2_API Aws::String SerializePayload() const override
const StartConversationHandler & GetEventStreamHandler() const
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
StartConversationRequest & WithConversationMode(const ConversationMode &value)
StartConversationRequest & WithConversationMode(ConversationMode &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String