AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
InvokeAgentRequest.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/BedrockAgentRuntimeRequest.h>
9#include <aws/bedrock-agent-runtime/model/InvokeAgentHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/bedrock-agent-runtime/model/BedrockModelConfigurations.h>
13#include <aws/bedrock-agent-runtime/model/PromptCreationConfigurations.h>
14#include <aws/bedrock-agent-runtime/model/SessionState.h>
15#include <aws/bedrock-agent-runtime/model/StreamingConfigurations.h>
16#include <utility>
17
18namespace Aws
19{
20namespace BedrockAgentRuntime
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_BEDROCKAGENTRUNTIME_API InvokeAgentRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "InvokeAgent"; }
37
38 inline virtual bool HasEventStreamResponse() const override { return true; }
39 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
40
41 AWS_BEDROCKAGENTRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
42
47
51 inline InvokeAgentHandler& GetEventStreamHandler() { return m_handler; }
52
56 inline void SetEventStreamHandler(const InvokeAgentHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
57
62
63
65
68 inline const Aws::String& GetAgentAliasId() const { return m_agentAliasId; }
69 inline bool AgentAliasIdHasBeenSet() const { return m_agentAliasIdHasBeenSet; }
70 template<typename AgentAliasIdT = Aws::String>
71 void SetAgentAliasId(AgentAliasIdT&& value) { m_agentAliasIdHasBeenSet = true; m_agentAliasId = std::forward<AgentAliasIdT>(value); }
72 template<typename AgentAliasIdT = Aws::String>
73 InvokeAgentRequest& WithAgentAliasId(AgentAliasIdT&& value) { SetAgentAliasId(std::forward<AgentAliasIdT>(value)); return *this;}
75
77
80 inline const Aws::String& GetAgentId() const { return m_agentId; }
81 inline bool AgentIdHasBeenSet() const { return m_agentIdHasBeenSet; }
82 template<typename AgentIdT = Aws::String>
83 void SetAgentId(AgentIdT&& value) { m_agentIdHasBeenSet = true; m_agentId = std::forward<AgentIdT>(value); }
84 template<typename AgentIdT = Aws::String>
85 InvokeAgentRequest& WithAgentId(AgentIdT&& value) { SetAgentId(std::forward<AgentIdT>(value)); return *this;}
87
89
92 inline const BedrockModelConfigurations& GetBedrockModelConfigurations() const { return m_bedrockModelConfigurations; }
93 inline bool BedrockModelConfigurationsHasBeenSet() const { return m_bedrockModelConfigurationsHasBeenSet; }
94 template<typename BedrockModelConfigurationsT = BedrockModelConfigurations>
95 void SetBedrockModelConfigurations(BedrockModelConfigurationsT&& value) { m_bedrockModelConfigurationsHasBeenSet = true; m_bedrockModelConfigurations = std::forward<BedrockModelConfigurationsT>(value); }
96 template<typename BedrockModelConfigurationsT = BedrockModelConfigurations>
97 InvokeAgentRequest& WithBedrockModelConfigurations(BedrockModelConfigurationsT&& value) { SetBedrockModelConfigurations(std::forward<BedrockModelConfigurationsT>(value)); return *this;}
99
101
107 inline bool GetEnableTrace() const { return m_enableTrace; }
108 inline bool EnableTraceHasBeenSet() const { return m_enableTraceHasBeenSet; }
109 inline void SetEnableTrace(bool value) { m_enableTraceHasBeenSet = true; m_enableTrace = value; }
110 inline InvokeAgentRequest& WithEnableTrace(bool value) { SetEnableTrace(value); return *this;}
112
114
117 inline bool GetEndSession() const { return m_endSession; }
118 inline bool EndSessionHasBeenSet() const { return m_endSessionHasBeenSet; }
119 inline void SetEndSession(bool value) { m_endSessionHasBeenSet = true; m_endSession = value; }
120 inline InvokeAgentRequest& WithEndSession(bool value) { SetEndSession(value); return *this;}
122
124
129 inline const Aws::String& GetInputText() const { return m_inputText; }
130 inline bool InputTextHasBeenSet() const { return m_inputTextHasBeenSet; }
131 template<typename InputTextT = Aws::String>
132 void SetInputText(InputTextT&& value) { m_inputTextHasBeenSet = true; m_inputText = std::forward<InputTextT>(value); }
133 template<typename InputTextT = Aws::String>
134 InvokeAgentRequest& WithInputText(InputTextT&& value) { SetInputText(std::forward<InputTextT>(value)); return *this;}
136
138
141 inline const Aws::String& GetMemoryId() const { return m_memoryId; }
142 inline bool MemoryIdHasBeenSet() const { return m_memoryIdHasBeenSet; }
143 template<typename MemoryIdT = Aws::String>
144 void SetMemoryId(MemoryIdT&& value) { m_memoryIdHasBeenSet = true; m_memoryId = std::forward<MemoryIdT>(value); }
145 template<typename MemoryIdT = Aws::String>
146 InvokeAgentRequest& WithMemoryId(MemoryIdT&& value) { SetMemoryId(std::forward<MemoryIdT>(value)); return *this;}
148
150
157 inline const PromptCreationConfigurations& GetPromptCreationConfigurations() const { return m_promptCreationConfigurations; }
158 inline bool PromptCreationConfigurationsHasBeenSet() const { return m_promptCreationConfigurationsHasBeenSet; }
159 template<typename PromptCreationConfigurationsT = PromptCreationConfigurations>
160 void SetPromptCreationConfigurations(PromptCreationConfigurationsT&& value) { m_promptCreationConfigurationsHasBeenSet = true; m_promptCreationConfigurations = std::forward<PromptCreationConfigurationsT>(value); }
161 template<typename PromptCreationConfigurationsT = PromptCreationConfigurations>
162 InvokeAgentRequest& WithPromptCreationConfigurations(PromptCreationConfigurationsT&& value) { SetPromptCreationConfigurations(std::forward<PromptCreationConfigurationsT>(value)); return *this;}
164
166
170 inline const Aws::String& GetSessionId() const { return m_sessionId; }
171 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
172 template<typename SessionIdT = Aws::String>
173 void SetSessionId(SessionIdT&& value) { m_sessionIdHasBeenSet = true; m_sessionId = std::forward<SessionIdT>(value); }
174 template<typename SessionIdT = Aws::String>
175 InvokeAgentRequest& WithSessionId(SessionIdT&& value) { SetSessionId(std::forward<SessionIdT>(value)); return *this;}
177
179
187 inline const SessionState& GetSessionState() const { return m_sessionState; }
188 inline bool SessionStateHasBeenSet() const { return m_sessionStateHasBeenSet; }
189 template<typename SessionStateT = SessionState>
190 void SetSessionState(SessionStateT&& value) { m_sessionStateHasBeenSet = true; m_sessionState = std::forward<SessionStateT>(value); }
191 template<typename SessionStateT = SessionState>
192 InvokeAgentRequest& WithSessionState(SessionStateT&& value) { SetSessionState(std::forward<SessionStateT>(value)); return *this;}
194
196
199 inline const Aws::String& GetSourceArn() const { return m_sourceArn; }
200 inline bool SourceArnHasBeenSet() const { return m_sourceArnHasBeenSet; }
201 template<typename SourceArnT = Aws::String>
202 void SetSourceArn(SourceArnT&& value) { m_sourceArnHasBeenSet = true; m_sourceArn = std::forward<SourceArnT>(value); }
203 template<typename SourceArnT = Aws::String>
204 InvokeAgentRequest& WithSourceArn(SourceArnT&& value) { SetSourceArn(std::forward<SourceArnT>(value)); return *this;}
206
208
213 inline const StreamingConfigurations& GetStreamingConfigurations() const { return m_streamingConfigurations; }
214 inline bool StreamingConfigurationsHasBeenSet() const { return m_streamingConfigurationsHasBeenSet; }
215 template<typename StreamingConfigurationsT = StreamingConfigurations>
216 void SetStreamingConfigurations(StreamingConfigurationsT&& value) { m_streamingConfigurationsHasBeenSet = true; m_streamingConfigurations = std::forward<StreamingConfigurationsT>(value); }
217 template<typename StreamingConfigurationsT = StreamingConfigurations>
218 InvokeAgentRequest& WithStreamingConfigurations(StreamingConfigurationsT&& value) { SetStreamingConfigurations(std::forward<StreamingConfigurationsT>(value)); return *this;}
220 private:
221
222 Aws::String m_agentAliasId;
223 bool m_agentAliasIdHasBeenSet = false;
224
225 Aws::String m_agentId;
226 bool m_agentIdHasBeenSet = false;
227
228 BedrockModelConfigurations m_bedrockModelConfigurations;
229 bool m_bedrockModelConfigurationsHasBeenSet = false;
230
231 bool m_enableTrace{false};
232 bool m_enableTraceHasBeenSet = false;
233
234 bool m_endSession{false};
235 bool m_endSessionHasBeenSet = false;
236
237 Aws::String m_inputText;
238 bool m_inputTextHasBeenSet = false;
239
240 Aws::String m_memoryId;
241 bool m_memoryIdHasBeenSet = false;
242
243 PromptCreationConfigurations m_promptCreationConfigurations;
244 bool m_promptCreationConfigurationsHasBeenSet = false;
245
246 Aws::String m_sessionId;
247 bool m_sessionIdHasBeenSet = false;
248
249 SessionState m_sessionState;
250 bool m_sessionStateHasBeenSet = false;
251
252 Aws::String m_sourceArn;
253 bool m_sourceArnHasBeenSet = false;
254
255 StreamingConfigurations m_streamingConfigurations;
256 bool m_streamingConfigurationsHasBeenSet = false;
257 InvokeAgentHandler m_handler;
259
260 };
261
262} // namespace Model
263} // namespace BedrockAgentRuntime
264} // 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::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String