AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
InvokeAgentRequest.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntimeRequest.h>
8#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
9#include <aws/bedrock-agent-runtime/model/BedrockModelConfigurations.h>
10#include <aws/bedrock-agent-runtime/model/InvokeAgentHandler.h>
11#include <aws/bedrock-agent-runtime/model/PromptCreationConfigurations.h>
12#include <aws/bedrock-agent-runtime/model/SessionState.h>
13#include <aws/bedrock-agent-runtime/model/StreamingConfigurations.h>
14#include <aws/core/utils/event/EventStreamDecoder.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16
17#include <utility>
18
19namespace Aws {
20namespace BedrockAgentRuntime {
21namespace Model {
22
26 public:
27 AWS_BEDROCKAGENTRUNTIME_API InvokeAgentRequest() = 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 "InvokeAgent"; }
34
35 inline virtual bool HasEventStreamResponse() const override { return true; }
36 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
37
38 AWS_BEDROCKAGENTRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39
44
48 inline InvokeAgentHandler& GetEventStreamHandler() { return m_handler; }
49
53 inline void SetEventStreamHandler(const InvokeAgentHandler& value) {
54 m_handler = value;
55 m_decoder.ResetEventStreamHandler(&m_handler);
56 }
57
63 return *this;
64 }
65
67
70 inline const Aws::String& GetAgentAliasId() const { return m_agentAliasId; }
71 inline bool AgentAliasIdHasBeenSet() const { return m_agentAliasIdHasBeenSet; }
72 template <typename AgentAliasIdT = Aws::String>
74 m_agentAliasIdHasBeenSet = true;
75 m_agentAliasId = std::forward<AgentAliasIdT>(value);
76 }
77 template <typename AgentAliasIdT = Aws::String>
79 SetAgentAliasId(std::forward<AgentAliasIdT>(value));
80 return *this;
81 }
83
85
88 inline const Aws::String& GetAgentId() const { return m_agentId; }
89 inline bool AgentIdHasBeenSet() const { return m_agentIdHasBeenSet; }
90 template <typename AgentIdT = Aws::String>
91 void SetAgentId(AgentIdT&& value) {
92 m_agentIdHasBeenSet = true;
93 m_agentId = std::forward<AgentIdT>(value);
94 }
95 template <typename AgentIdT = Aws::String>
97 SetAgentId(std::forward<AgentIdT>(value));
98 return *this;
99 }
101
103
106 inline const BedrockModelConfigurations& GetBedrockModelConfigurations() const { return m_bedrockModelConfigurations; }
107 inline bool BedrockModelConfigurationsHasBeenSet() const { return m_bedrockModelConfigurationsHasBeenSet; }
108 template <typename BedrockModelConfigurationsT = BedrockModelConfigurations>
110 m_bedrockModelConfigurationsHasBeenSet = true;
111 m_bedrockModelConfigurations = std::forward<BedrockModelConfigurationsT>(value);
112 }
113 template <typename BedrockModelConfigurationsT = BedrockModelConfigurations>
115 SetBedrockModelConfigurations(std::forward<BedrockModelConfigurationsT>(value));
116 return *this;
117 }
119
121
127 inline bool GetEnableTrace() const { return m_enableTrace; }
128 inline bool EnableTraceHasBeenSet() const { return m_enableTraceHasBeenSet; }
129 inline void SetEnableTrace(bool value) {
130 m_enableTraceHasBeenSet = true;
131 m_enableTrace = value;
132 }
134 SetEnableTrace(value);
135 return *this;
136 }
138
140
143 inline bool GetEndSession() const { return m_endSession; }
144 inline bool EndSessionHasBeenSet() const { return m_endSessionHasBeenSet; }
145 inline void SetEndSession(bool value) {
146 m_endSessionHasBeenSet = true;
147 m_endSession = value;
148 }
149 inline InvokeAgentRequest& WithEndSession(bool value) {
150 SetEndSession(value);
151 return *this;
152 }
154
156
161 inline const Aws::String& GetInputText() const { return m_inputText; }
162 inline bool InputTextHasBeenSet() const { return m_inputTextHasBeenSet; }
163 template <typename InputTextT = Aws::String>
164 void SetInputText(InputTextT&& value) {
165 m_inputTextHasBeenSet = true;
166 m_inputText = std::forward<InputTextT>(value);
167 }
168 template <typename InputTextT = Aws::String>
170 SetInputText(std::forward<InputTextT>(value));
171 return *this;
172 }
174
176
179 inline const Aws::String& GetMemoryId() const { return m_memoryId; }
180 inline bool MemoryIdHasBeenSet() const { return m_memoryIdHasBeenSet; }
181 template <typename MemoryIdT = Aws::String>
182 void SetMemoryId(MemoryIdT&& value) {
183 m_memoryIdHasBeenSet = true;
184 m_memoryId = std::forward<MemoryIdT>(value);
185 }
186 template <typename MemoryIdT = Aws::String>
188 SetMemoryId(std::forward<MemoryIdT>(value));
189 return *this;
190 }
192
194
201 inline const PromptCreationConfigurations& GetPromptCreationConfigurations() const { return m_promptCreationConfigurations; }
202 inline bool PromptCreationConfigurationsHasBeenSet() const { return m_promptCreationConfigurationsHasBeenSet; }
203 template <typename PromptCreationConfigurationsT = PromptCreationConfigurations>
205 m_promptCreationConfigurationsHasBeenSet = true;
206 m_promptCreationConfigurations = std::forward<PromptCreationConfigurationsT>(value);
207 }
208 template <typename PromptCreationConfigurationsT = PromptCreationConfigurations>
210 SetPromptCreationConfigurations(std::forward<PromptCreationConfigurationsT>(value));
211 return *this;
212 }
214
216
220 inline const Aws::String& GetSessionId() const { return m_sessionId; }
221 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
222 template <typename SessionIdT = Aws::String>
223 void SetSessionId(SessionIdT&& value) {
224 m_sessionIdHasBeenSet = true;
225 m_sessionId = std::forward<SessionIdT>(value);
226 }
227 template <typename SessionIdT = Aws::String>
229 SetSessionId(std::forward<SessionIdT>(value));
230 return *this;
231 }
233
235
243 inline const SessionState& GetSessionState() const { return m_sessionState; }
244 inline bool SessionStateHasBeenSet() const { return m_sessionStateHasBeenSet; }
245 template <typename SessionStateT = SessionState>
247 m_sessionStateHasBeenSet = true;
248 m_sessionState = std::forward<SessionStateT>(value);
249 }
250 template <typename SessionStateT = SessionState>
252 SetSessionState(std::forward<SessionStateT>(value));
253 return *this;
254 }
256
258
261 inline const Aws::String& GetSourceArn() const { return m_sourceArn; }
262 inline bool SourceArnHasBeenSet() const { return m_sourceArnHasBeenSet; }
263 template <typename SourceArnT = Aws::String>
264 void SetSourceArn(SourceArnT&& value) {
265 m_sourceArnHasBeenSet = true;
266 m_sourceArn = std::forward<SourceArnT>(value);
267 }
268 template <typename SourceArnT = Aws::String>
270 SetSourceArn(std::forward<SourceArnT>(value));
271 return *this;
272 }
274
276
281 inline const StreamingConfigurations& GetStreamingConfigurations() const { return m_streamingConfigurations; }
282 inline bool StreamingConfigurationsHasBeenSet() const { return m_streamingConfigurationsHasBeenSet; }
283 template <typename StreamingConfigurationsT = StreamingConfigurations>
285 m_streamingConfigurationsHasBeenSet = true;
286 m_streamingConfigurations = std::forward<StreamingConfigurationsT>(value);
287 }
288 template <typename StreamingConfigurationsT = StreamingConfigurations>
290 SetStreamingConfigurations(std::forward<StreamingConfigurationsT>(value));
291 return *this;
292 }
294 private:
295 Aws::String m_agentAliasId;
296
297 Aws::String m_agentId;
298
299 BedrockModelConfigurations m_bedrockModelConfigurations;
300
301 bool m_enableTrace{false};
302
303 bool m_endSession{false};
304
305 Aws::String m_inputText;
306
307 Aws::String m_memoryId;
308
309 PromptCreationConfigurations m_promptCreationConfigurations;
310
311 Aws::String m_sessionId;
312
313 SessionState m_sessionState;
314
315 Aws::String m_sourceArn;
316
317 StreamingConfigurations m_streamingConfigurations;
318 InvokeAgentHandler m_handler;
320
321 bool m_agentAliasIdHasBeenSet = false;
322 bool m_agentIdHasBeenSet = false;
323 bool m_bedrockModelConfigurationsHasBeenSet = false;
324 bool m_enableTraceHasBeenSet = false;
325 bool m_endSessionHasBeenSet = false;
326 bool m_inputTextHasBeenSet = false;
327 bool m_memoryIdHasBeenSet = false;
328 bool m_promptCreationConfigurationsHasBeenSet = false;
329 bool m_sessionIdHasBeenSet = false;
330 bool m_sessionStateHasBeenSet = false;
331 bool m_sourceArnHasBeenSet = false;
332 bool m_streamingConfigurationsHasBeenSet = false;
333};
334
335} // namespace Model
336} // namespace BedrockAgentRuntime
337} // namespace Aws
void SetPromptCreationConfigurations(PromptCreationConfigurationsT &&value)
InvokeAgentRequest & WithMemoryId(MemoryIdT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
InvokeAgentRequest & WithInputText(InputTextT &&value)
InvokeAgentRequest & WithBedrockModelConfigurations(BedrockModelConfigurationsT &&value)
InvokeAgentRequest & WithPromptCreationConfigurations(PromptCreationConfigurationsT &&value)
InvokeAgentRequest & WithEventStreamHandler(const InvokeAgentHandler &value)
void SetEventStreamHandler(const InvokeAgentHandler &value)
void SetBedrockModelConfigurations(BedrockModelConfigurationsT &&value)
InvokeAgentRequest & WithAgentAliasId(AgentAliasIdT &&value)
const PromptCreationConfigurations & GetPromptCreationConfigurations() const
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
InvokeAgentRequest & WithSessionState(SessionStateT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_BEDROCKAGENTRUNTIME_API InvokeAgentRequest()=default
const StreamingConfigurations & GetStreamingConfigurations() const
InvokeAgentRequest & WithAgentId(AgentIdT &&value)
InvokeAgentRequest & WithSessionId(SessionIdT &&value)
void SetStreamingConfigurations(StreamingConfigurationsT &&value)
InvokeAgentRequest & WithStreamingConfigurations(StreamingConfigurationsT &&value)
InvokeAgentRequest & WithSourceArn(SourceArnT &&value)
const BedrockModelConfigurations & GetBedrockModelConfigurations() const
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String