AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
ChatRequest.h
1
6#pragma once
7#include <aws/assurance/AssuranceRequest.h>
8#include <aws/assurance/Assurance_EXPORTS.h>
9#include <aws/assurance/model/ChatHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Assurance {
17namespace Model {
18
22 public:
23 AWS_ASSURANCE_API ChatRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "Chat"; }
30
31 inline virtual bool HasEventStreamResponse() const override { return true; }
32 AWS_ASSURANCE_API Aws::String SerializePayload() const override;
33
35
40
44 inline ChatHandler& GetEventStreamHandler() { return m_handler; }
45
49 inline void SetEventStreamHandler(const ChatHandler& value) {
50 m_handler = value;
51 m_decoder.ResetEventStreamHandler(&m_handler);
52 }
53
59 return *this;
60 }
61
63
66 inline const Aws::String& GetMessage() const { return m_message; }
67 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
68 template <typename MessageT = Aws::String>
69 void SetMessage(MessageT&& value) {
70 m_messageHasBeenSet = true;
71 m_message = std::forward<MessageT>(value);
72 }
73 template <typename MessageT = Aws::String>
74 ChatRequest& WithMessage(MessageT&& value) {
75 SetMessage(std::forward<MessageT>(value));
76 return *this;
77 }
79
81
88 inline const Aws::String& GetSessionId() const { return m_sessionId; }
89 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
90 template <typename SessionIdT = Aws::String>
91 void SetSessionId(SessionIdT&& value) {
92 m_sessionIdHasBeenSet = true;
93 m_sessionId = std::forward<SessionIdT>(value);
94 }
95 template <typename SessionIdT = Aws::String>
96 ChatRequest& WithSessionId(SessionIdT&& value) {
97 SetSessionId(std::forward<SessionIdT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::String& GetEnvironmentArn() const { return m_environmentArn; }
107 inline bool EnvironmentArnHasBeenSet() const { return m_environmentArnHasBeenSet; }
108 template <typename EnvironmentArnT = Aws::String>
109 void SetEnvironmentArn(EnvironmentArnT&& value) {
110 m_environmentArnHasBeenSet = true;
111 m_environmentArn = std::forward<EnvironmentArnT>(value);
112 }
113 template <typename EnvironmentArnT = Aws::String>
114 ChatRequest& WithEnvironmentArn(EnvironmentArnT&& value) {
115 SetEnvironmentArn(std::forward<EnvironmentArnT>(value));
116 return *this;
117 }
119
121
126 inline long long GetExpectedSequenceNumber() const { return m_expectedSequenceNumber; }
127 inline bool ExpectedSequenceNumberHasBeenSet() const { return m_expectedSequenceNumberHasBeenSet; }
128 inline void SetExpectedSequenceNumber(long long value) {
129 m_expectedSequenceNumberHasBeenSet = true;
130 m_expectedSequenceNumber = value;
131 }
132 inline ChatRequest& WithExpectedSequenceNumber(long long value) {
134 return *this;
135 }
137 private:
138 Aws::String m_message;
139
140 Aws::String m_sessionId;
141
142 Aws::String m_environmentArn;
143
144 long long m_expectedSequenceNumber{0};
145 ChatHandler m_handler;
147
148 bool m_messageHasBeenSet = false;
149 bool m_sessionIdHasBeenSet = false;
150 bool m_environmentArnHasBeenSet = false;
151 bool m_expectedSequenceNumberHasBeenSet = false;
152};
153
154} // namespace Model
155} // namespace Assurance
156} // namespace Aws
AWS_ASSURANCE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ChatRequest & WithEventStreamHandler(const ChatHandler &value)
Definition ChatRequest.h:57
void SetEventStreamHandler(const ChatHandler &value)
Definition ChatRequest.h:49
const Aws::String & GetSessionId() const
Definition ChatRequest.h:88
AWS_ASSURANCE_API ChatRequest()=default
void SetSessionId(SessionIdT &&value)
Definition ChatRequest.h:91
virtual bool HasEventStreamResponse() const override
Definition ChatRequest.h:31
void SetEnvironmentArn(EnvironmentArnT &&value)
virtual const char * GetServiceRequestName() const override
Definition ChatRequest.h:29
ChatRequest & WithExpectedSequenceNumber(long long value)
const Aws::String & GetMessage() const
Definition ChatRequest.h:66
ChatRequest & WithMessage(MessageT &&value)
Definition ChatRequest.h:74
ChatRequest & WithSessionId(SessionIdT &&value)
Definition ChatRequest.h:96
AWS_ASSURANCE_API Aws::String SerializePayload() const override
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
Definition ChatRequest.h:39
long long GetExpectedSequenceNumber() const
ChatRequest & WithEnvironmentArn(EnvironmentArnT &&value)
const Aws::String & GetEnvironmentArn() const
void SetExpectedSequenceNumber(long long value)
void SetMessage(MessageT &&value)
Definition ChatRequest.h:69
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String