AWS SDK for C++

AWS SDK for C++ Version 1.11.787

Loading...
Searching...
No Matches
SendMessageRequest.h
1
6#pragma once
7#include <aws/core/utils/event/EventStreamDecoder.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/devops-agent/DevOpsAgentRequest.h>
10#include <aws/devops-agent/DevOpsAgent_EXPORTS.h>
11#include <aws/devops-agent/model/SendMessageContext.h>
12#include <aws/devops-agent/model/SendMessageHandler.h>
13
14#include <utility>
15
16namespace Aws {
17namespace DevOpsAgent {
18namespace Model {
19
26 public:
27 AWS_DEVOPSAGENT_API SendMessageRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "SendMessage"; }
34
35 inline virtual bool HasEventStreamResponse() const override { return true; }
36 AWS_DEVOPSAGENT_API Aws::String SerializePayload() const override;
37
42
46 inline SendMessageHandler& GetEventStreamHandler() { return m_handler; }
47
51 inline void SetEventStreamHandler(const SendMessageHandler& value) {
52 m_handler = value;
53 m_decoder.ResetEventStreamHandler(&m_handler);
54 }
55
61 return *this;
62 }
63
65
68 inline const Aws::String& GetAgentSpaceId() const { return m_agentSpaceId; }
69 inline bool AgentSpaceIdHasBeenSet() const { return m_agentSpaceIdHasBeenSet; }
70 template <typename AgentSpaceIdT = Aws::String>
71 void SetAgentSpaceId(AgentSpaceIdT&& value) {
72 m_agentSpaceIdHasBeenSet = true;
73 m_agentSpaceId = std::forward<AgentSpaceIdT>(value);
74 }
75 template <typename AgentSpaceIdT = Aws::String>
76 SendMessageRequest& WithAgentSpaceId(AgentSpaceIdT&& value) {
77 SetAgentSpaceId(std::forward<AgentSpaceIdT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::String& GetExecutionId() const { return m_executionId; }
87 inline bool ExecutionIdHasBeenSet() const { return m_executionIdHasBeenSet; }
88 template <typename ExecutionIdT = Aws::String>
89 void SetExecutionId(ExecutionIdT&& value) {
90 m_executionIdHasBeenSet = true;
91 m_executionId = std::forward<ExecutionIdT>(value);
92 }
93 template <typename ExecutionIdT = Aws::String>
94 SendMessageRequest& WithExecutionId(ExecutionIdT&& value) {
95 SetExecutionId(std::forward<ExecutionIdT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::String& GetContent() const { return m_content; }
105 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
106 template <typename ContentT = Aws::String>
107 void SetContent(ContentT&& value) {
108 m_contentHasBeenSet = true;
109 m_content = std::forward<ContentT>(value);
110 }
111 template <typename ContentT = Aws::String>
112 SendMessageRequest& WithContent(ContentT&& value) {
113 SetContent(std::forward<ContentT>(value));
114 return *this;
115 }
117
119
122 inline const SendMessageContext& GetContext() const { return m_context; }
123 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
124 template <typename ContextT = SendMessageContext>
125 void SetContext(ContextT&& value) {
126 m_contextHasBeenSet = true;
127 m_context = std::forward<ContextT>(value);
128 }
129 template <typename ContextT = SendMessageContext>
130 SendMessageRequest& WithContext(ContextT&& value) {
131 SetContext(std::forward<ContextT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::String& GetUserId() const { return m_userId; }
141 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
142 template <typename UserIdT = Aws::String>
143 void SetUserId(UserIdT&& value) {
144 m_userIdHasBeenSet = true;
145 m_userId = std::forward<UserIdT>(value);
146 }
147 template <typename UserIdT = Aws::String>
148 SendMessageRequest& WithUserId(UserIdT&& value) {
149 SetUserId(std::forward<UserIdT>(value));
150 return *this;
151 }
153 private:
154 Aws::String m_agentSpaceId;
155
156 Aws::String m_executionId;
157
158 Aws::String m_content;
159
160 SendMessageContext m_context;
161
162 Aws::String m_userId;
163 SendMessageHandler m_handler;
165
166 bool m_agentSpaceIdHasBeenSet = false;
167 bool m_executionIdHasBeenSet = false;
168 bool m_contentHasBeenSet = false;
169 bool m_contextHasBeenSet = false;
170 bool m_userIdHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace DevOpsAgent
175} // namespace Aws
AWS_DEVOPSAGENT_API Aws::String SerializePayload() const override
virtual bool HasEventStreamResponse() const override
SendMessageRequest & WithEventStreamHandler(const SendMessageHandler &value)
const SendMessageContext & GetContext() const
SendMessageRequest & WithUserId(UserIdT &&value)
void SetEventStreamHandler(const SendMessageHandler &value)
virtual const char * GetServiceRequestName() const override
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
SendMessageRequest & WithExecutionId(ExecutionIdT &&value)
SendMessageRequest & WithContent(ContentT &&value)
AWS_DEVOPSAGENT_API SendMessageRequest()=default
SendMessageRequest & WithAgentSpaceId(AgentSpaceIdT &&value)
SendMessageRequest & WithContext(ContextT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String