AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ChatRequest.h
1
6#pragma once
7#include <aws/qbusiness/QBusiness_EXPORTS.h>
8#include <aws/qbusiness/QBusinessRequest.h>
9#include <aws/qbusiness/model/ChatHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <memory>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/qbusiness/model/ChatInputStream.h>
15#include <utility>
16#include <aws/core/utils/UUID.h>
17
18namespace Aws
19{
20namespace Http
21{
22 class URI;
23} //namespace Http
24namespace QBusiness
25{
26namespace Model
27{
28
32 {
33 public:
34 AWS_QBUSINESS_API ChatRequest();
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "Chat"; }
41
42 inline virtual bool IsEventStreamRequest() const override { return true; }
43 // SerializePayload will not be invoked.
44 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
45 AWS_QBUSINESS_API Aws::String SerializePayload() const override { return {}; }
46 AWS_QBUSINESS_API std::shared_ptr<Aws::IOStream> GetBody() const override;
47 AWS_QBUSINESS_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
48
53
57 inline const ChatHandler& GetEventStreamHandler() const { return m_handler; }
58
62 inline void SetEventStreamHandler(const ChatHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
63
67 inline ChatRequest& WithEventStreamHandler(const ChatHandler& value) { SetEventStreamHandler(value); return *this; }
68
69
71
75 inline const Aws::String& GetApplicationId() const{ return m_applicationId; }
76 inline bool ApplicationIdHasBeenSet() const { return m_applicationIdHasBeenSet; }
77 inline void SetApplicationId(const Aws::String& value) { m_applicationIdHasBeenSet = true; m_applicationId = value; }
78 inline void SetApplicationId(Aws::String&& value) { m_applicationIdHasBeenSet = true; m_applicationId = std::move(value); }
79 inline void SetApplicationId(const char* value) { m_applicationIdHasBeenSet = true; m_applicationId.assign(value); }
80 inline ChatRequest& WithApplicationId(const Aws::String& value) { SetApplicationId(value); return *this;}
81 inline ChatRequest& WithApplicationId(Aws::String&& value) { SetApplicationId(std::move(value)); return *this;}
82 inline ChatRequest& WithApplicationId(const char* value) { SetApplicationId(value); return *this;}
84
86
89 inline const Aws::String& GetUserId() const{ return m_userId; }
90 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
91 inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; }
92 inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); }
93 inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); }
94 inline ChatRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;}
95 inline ChatRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;}
96 inline ChatRequest& WithUserId(const char* value) { SetUserId(value); return *this;}
98
100
103 inline const Aws::Vector<Aws::String>& GetUserGroups() const{ return m_userGroups; }
104 inline bool UserGroupsHasBeenSet() const { return m_userGroupsHasBeenSet; }
105 inline void SetUserGroups(const Aws::Vector<Aws::String>& value) { m_userGroupsHasBeenSet = true; m_userGroups = value; }
106 inline void SetUserGroups(Aws::Vector<Aws::String>&& value) { m_userGroupsHasBeenSet = true; m_userGroups = std::move(value); }
107 inline ChatRequest& WithUserGroups(const Aws::Vector<Aws::String>& value) { SetUserGroups(value); return *this;}
108 inline ChatRequest& WithUserGroups(Aws::Vector<Aws::String>&& value) { SetUserGroups(std::move(value)); return *this;}
109 inline ChatRequest& AddUserGroups(const Aws::String& value) { m_userGroupsHasBeenSet = true; m_userGroups.push_back(value); return *this; }
110 inline ChatRequest& AddUserGroups(Aws::String&& value) { m_userGroupsHasBeenSet = true; m_userGroups.push_back(std::move(value)); return *this; }
111 inline ChatRequest& AddUserGroups(const char* value) { m_userGroupsHasBeenSet = true; m_userGroups.push_back(value); return *this; }
113
115
118 inline const Aws::String& GetConversationId() const{ return m_conversationId; }
119 inline bool ConversationIdHasBeenSet() const { return m_conversationIdHasBeenSet; }
120 inline void SetConversationId(const Aws::String& value) { m_conversationIdHasBeenSet = true; m_conversationId = value; }
121 inline void SetConversationId(Aws::String&& value) { m_conversationIdHasBeenSet = true; m_conversationId = std::move(value); }
122 inline void SetConversationId(const char* value) { m_conversationIdHasBeenSet = true; m_conversationId.assign(value); }
123 inline ChatRequest& WithConversationId(const Aws::String& value) { SetConversationId(value); return *this;}
124 inline ChatRequest& WithConversationId(Aws::String&& value) { SetConversationId(std::move(value)); return *this;}
125 inline ChatRequest& WithConversationId(const char* value) { SetConversationId(value); return *this;}
127
129
133 inline const Aws::String& GetParentMessageId() const{ return m_parentMessageId; }
134 inline bool ParentMessageIdHasBeenSet() const { return m_parentMessageIdHasBeenSet; }
135 inline void SetParentMessageId(const Aws::String& value) { m_parentMessageIdHasBeenSet = true; m_parentMessageId = value; }
136 inline void SetParentMessageId(Aws::String&& value) { m_parentMessageIdHasBeenSet = true; m_parentMessageId = std::move(value); }
137 inline void SetParentMessageId(const char* value) { m_parentMessageIdHasBeenSet = true; m_parentMessageId.assign(value); }
138 inline ChatRequest& WithParentMessageId(const Aws::String& value) { SetParentMessageId(value); return *this;}
139 inline ChatRequest& WithParentMessageId(Aws::String&& value) { SetParentMessageId(std::move(value)); return *this;}
140 inline ChatRequest& WithParentMessageId(const char* value) { SetParentMessageId(value); return *this;}
142
144
147 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
148 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
149 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
150 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
151 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
152 inline ChatRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
153 inline ChatRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
154 inline ChatRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
156
158
161 AWS_QBUSINESS_API std::shared_ptr<ChatInputStream> GetInputStream() const { return m_inputStream; }
162 AWS_QBUSINESS_API void SetInputStream(const std::shared_ptr<ChatInputStream>& value) { m_inputStream = value; }
163 AWS_QBUSINESS_API ChatRequest& WithInputStream(const std::shared_ptr<ChatInputStream>& value) { SetInputStream(value); return *this;}
164
166 private:
167
168 Aws::String m_applicationId;
169 bool m_applicationIdHasBeenSet = false;
170
171 Aws::String m_userId;
172 bool m_userIdHasBeenSet = false;
173
174 Aws::Vector<Aws::String> m_userGroups;
175 bool m_userGroupsHasBeenSet = false;
176
177 Aws::String m_conversationId;
178 bool m_conversationIdHasBeenSet = false;
179
180 Aws::String m_parentMessageId;
181 bool m_parentMessageIdHasBeenSet = false;
182
183 Aws::String m_clientToken;
184 bool m_clientTokenHasBeenSet = false;
185
186 std::shared_ptr<ChatInputStream> m_inputStream;
187 ChatHandler m_handler;
189
190 };
191
192} // namespace Model
193} // namespace QBusiness
194} // namespace Aws
void SetClientToken(const Aws::String &value)
ChatRequest & WithEventStreamHandler(const ChatHandler &value)
Definition ChatRequest.h:67
void SetParentMessageId(const char *value)
ChatRequest & WithClientToken(const Aws::String &value)
const Aws::String & GetUserId() const
Definition ChatRequest.h:89
const Aws::Vector< Aws::String > & GetUserGroups() const
void SetParentMessageId(const Aws::String &value)
ChatRequest & WithUserId(const char *value)
Definition ChatRequest.h:96
void SetUserGroups(const Aws::Vector< Aws::String > &value)
void SetApplicationId(const char *value)
Definition ChatRequest.h:79
const ChatHandler & GetEventStreamHandler() const
Definition ChatRequest.h:57
void SetUserGroups(Aws::Vector< Aws::String > &&value)
ChatRequest & WithApplicationId(const char *value)
Definition ChatRequest.h:82
ChatRequest & WithUserGroups(const Aws::Vector< Aws::String > &value)
AWS_QBUSINESS_API std::shared_ptr< ChatInputStream > GetInputStream() const
AWS_QBUSINESS_API void SetInputStream(const std::shared_ptr< ChatInputStream > &value)
void SetConversationId(const Aws::String &value)
const Aws::String & GetConversationId() const
const Aws::String & GetParentMessageId() const
AWS_QBUSINESS_API std::shared_ptr< Aws::IOStream > GetBody() const override
void SetConversationId(const char *value)
ChatRequest & WithUserGroups(Aws::Vector< Aws::String > &&value)
ChatRequest & WithApplicationId(const Aws::String &value)
Definition ChatRequest.h:80
ChatRequest & WithClientToken(const char *value)
ChatRequest & WithConversationId(const Aws::String &value)
const Aws::String & GetApplicationId() const
Definition ChatRequest.h:75
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
Definition ChatRequest.h:52
ChatRequest & WithApplicationId(Aws::String &&value)
Definition ChatRequest.h:81
void SetApplicationId(const Aws::String &value)
Definition ChatRequest.h:77
virtual bool IsEventStreamRequest() const override
Definition ChatRequest.h:42
AWS_QBUSINESS_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
ChatRequest & WithConversationId(Aws::String &&value)
ChatRequest & WithUserId(Aws::String &&value)
Definition ChatRequest.h:95
ChatRequest & WithUserId(const Aws::String &value)
Definition ChatRequest.h:94
void SetApplicationId(Aws::String &&value)
Definition ChatRequest.h:78
virtual const char * GetServiceRequestName() const override
Definition ChatRequest.h:40
ChatRequest & AddUserGroups(const char *value)
ChatRequest & AddUserGroups(Aws::String &&value)
void SetConversationId(Aws::String &&value)
const Aws::String & GetClientToken() const
ChatRequest & WithConversationId(const char *value)
void SetClientToken(Aws::String &&value)
ChatRequest & WithParentMessageId(const char *value)
ChatRequest & AddUserGroups(const Aws::String &value)
void SetUserId(const char *value)
Definition ChatRequest.h:93
ChatRequest & WithParentMessageId(Aws::String &&value)
ChatRequest & WithParentMessageId(const Aws::String &value)
AWS_QBUSINESS_API ChatRequest & WithInputStream(const std::shared_ptr< ChatInputStream > &value)
ChatRequest & WithClientToken(Aws::String &&value)
void SetEventStreamHandler(const ChatHandler &value)
Definition ChatRequest.h:62
void SetUserId(const Aws::String &value)
Definition ChatRequest.h:91
void SetClientToken(const char *value)
void SetUserId(Aws::String &&value)
Definition ChatRequest.h:92
AWS_QBUSINESS_API Aws::String SerializePayload() const override
Definition ChatRequest.h:45
void SetParentMessageId(Aws::String &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector