AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
InvokeInlineAgentRequest.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/AgentActionGroup.h>
10#include <aws/bedrock-agent-runtime/model/AgentCollaboration.h>
11#include <aws/bedrock-agent-runtime/model/Collaborator.h>
12#include <aws/bedrock-agent-runtime/model/CollaboratorConfiguration.h>
13#include <aws/bedrock-agent-runtime/model/CustomOrchestration.h>
14#include <aws/bedrock-agent-runtime/model/GuardrailConfigurationWithArn.h>
15#include <aws/bedrock-agent-runtime/model/InlineBedrockModelConfigurations.h>
16#include <aws/bedrock-agent-runtime/model/InlineSessionState.h>
17#include <aws/bedrock-agent-runtime/model/InvokeInlineAgentHandler.h>
18#include <aws/bedrock-agent-runtime/model/KnowledgeBase.h>
19#include <aws/bedrock-agent-runtime/model/OrchestrationType.h>
20#include <aws/bedrock-agent-runtime/model/PromptCreationConfigurations.h>
21#include <aws/bedrock-agent-runtime/model/PromptOverrideConfiguration.h>
22#include <aws/bedrock-agent-runtime/model/StreamingConfigurations.h>
23#include <aws/core/utils/event/EventStreamDecoder.h>
24#include <aws/core/utils/memory/stl/AWSString.h>
25#include <aws/core/utils/memory/stl/AWSVector.h>
26
27#include <utility>
28
29namespace Aws {
30namespace BedrockAgentRuntime {
31namespace Model {
32
36 public:
37 AWS_BEDROCKAGENTRUNTIME_API InvokeInlineAgentRequest() = default;
38
39 // Service request name is the Operation name which will send this request out,
40 // each operation should has unique request name, so that we can get operation's name from this request.
41 // Note: this is not true for response, multiple operations may have the same response name,
42 // so we can not get operation's name from response.
43 inline virtual const char* GetServiceRequestName() const override { return "InvokeInlineAgent"; }
44
45 inline virtual bool HasEventStreamResponse() const override { return true; }
46 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
47
52
56 inline InvokeInlineAgentHandler& GetEventStreamHandler() { return m_handler; }
57
62 m_handler = value;
63 m_decoder.ResetEventStreamHandler(&m_handler);
64 }
65
71 return *this;
72 }
73
75
79 inline const Aws::Vector<AgentActionGroup>& GetActionGroups() const { return m_actionGroups; }
80 inline bool ActionGroupsHasBeenSet() const { return m_actionGroupsHasBeenSet; }
81 template <typename ActionGroupsT = Aws::Vector<AgentActionGroup>>
83 m_actionGroupsHasBeenSet = true;
84 m_actionGroups = std::forward<ActionGroupsT>(value);
85 }
86 template <typename ActionGroupsT = Aws::Vector<AgentActionGroup>>
88 SetActionGroups(std::forward<ActionGroupsT>(value));
89 return *this;
90 }
91 template <typename ActionGroupsT = AgentActionGroup>
93 m_actionGroupsHasBeenSet = true;
94 m_actionGroups.emplace_back(std::forward<ActionGroupsT>(value));
95 return *this;
96 }
98
100
105 inline AgentCollaboration GetAgentCollaboration() const { return m_agentCollaboration; }
106 inline bool AgentCollaborationHasBeenSet() const { return m_agentCollaborationHasBeenSet; }
108 m_agentCollaborationHasBeenSet = true;
109 m_agentCollaboration = value;
110 }
113 return *this;
114 }
116
118
121 inline const Aws::String& GetAgentName() const { return m_agentName; }
122 inline bool AgentNameHasBeenSet() const { return m_agentNameHasBeenSet; }
123 template <typename AgentNameT = Aws::String>
124 void SetAgentName(AgentNameT&& value) {
125 m_agentNameHasBeenSet = true;
126 m_agentName = std::forward<AgentNameT>(value);
127 }
128 template <typename AgentNameT = Aws::String>
130 SetAgentName(std::forward<AgentNameT>(value));
131 return *this;
132 }
134
136
139 inline const InlineBedrockModelConfigurations& GetBedrockModelConfigurations() const { return m_bedrockModelConfigurations; }
140 inline bool BedrockModelConfigurationsHasBeenSet() const { return m_bedrockModelConfigurationsHasBeenSet; }
141 template <typename BedrockModelConfigurationsT = InlineBedrockModelConfigurations>
143 m_bedrockModelConfigurationsHasBeenSet = true;
144 m_bedrockModelConfigurations = std::forward<BedrockModelConfigurationsT>(value);
145 }
146 template <typename BedrockModelConfigurationsT = InlineBedrockModelConfigurations>
148 SetBedrockModelConfigurations(std::forward<BedrockModelConfigurationsT>(value));
149 return *this;
150 }
152
154
159 inline const Aws::Vector<CollaboratorConfiguration>& GetCollaboratorConfigurations() const { return m_collaboratorConfigurations; }
160 inline bool CollaboratorConfigurationsHasBeenSet() const { return m_collaboratorConfigurationsHasBeenSet; }
161 template <typename CollaboratorConfigurationsT = Aws::Vector<CollaboratorConfiguration>>
163 m_collaboratorConfigurationsHasBeenSet = true;
164 m_collaboratorConfigurations = std::forward<CollaboratorConfigurationsT>(value);
165 }
166 template <typename CollaboratorConfigurationsT = Aws::Vector<CollaboratorConfiguration>>
168 SetCollaboratorConfigurations(std::forward<CollaboratorConfigurationsT>(value));
169 return *this;
170 }
171 template <typename CollaboratorConfigurationsT = CollaboratorConfiguration>
173 m_collaboratorConfigurationsHasBeenSet = true;
174 m_collaboratorConfigurations.emplace_back(std::forward<CollaboratorConfigurationsT>(value));
175 return *this;
176 }
178
180
183 inline const Aws::Vector<Collaborator>& GetCollaborators() const { return m_collaborators; }
184 inline bool CollaboratorsHasBeenSet() const { return m_collaboratorsHasBeenSet; }
185 template <typename CollaboratorsT = Aws::Vector<Collaborator>>
187 m_collaboratorsHasBeenSet = true;
188 m_collaborators = std::forward<CollaboratorsT>(value);
189 }
190 template <typename CollaboratorsT = Aws::Vector<Collaborator>>
192 SetCollaborators(std::forward<CollaboratorsT>(value));
193 return *this;
194 }
195 template <typename CollaboratorsT = Collaborator>
197 m_collaboratorsHasBeenSet = true;
198 m_collaborators.emplace_back(std::forward<CollaboratorsT>(value));
199 return *this;
200 }
202
204
207 inline const CustomOrchestration& GetCustomOrchestration() const { return m_customOrchestration; }
208 inline bool CustomOrchestrationHasBeenSet() const { return m_customOrchestrationHasBeenSet; }
209 template <typename CustomOrchestrationT = CustomOrchestration>
211 m_customOrchestrationHasBeenSet = true;
212 m_customOrchestration = std::forward<CustomOrchestrationT>(value);
213 }
214 template <typename CustomOrchestrationT = CustomOrchestration>
216 SetCustomOrchestration(std::forward<CustomOrchestrationT>(value));
217 return *this;
218 }
220
222
226 inline const Aws::String& GetCustomerEncryptionKeyArn() const { return m_customerEncryptionKeyArn; }
227 inline bool CustomerEncryptionKeyArnHasBeenSet() const { return m_customerEncryptionKeyArnHasBeenSet; }
228 template <typename CustomerEncryptionKeyArnT = Aws::String>
230 m_customerEncryptionKeyArnHasBeenSet = true;
231 m_customerEncryptionKeyArn = std::forward<CustomerEncryptionKeyArnT>(value);
232 }
233 template <typename CustomerEncryptionKeyArnT = Aws::String>
235 SetCustomerEncryptionKeyArn(std::forward<CustomerEncryptionKeyArnT>(value));
236 return *this;
237 }
239
241
247 inline bool GetEnableTrace() const { return m_enableTrace; }
248 inline bool EnableTraceHasBeenSet() const { return m_enableTraceHasBeenSet; }
249 inline void SetEnableTrace(bool value) {
250 m_enableTraceHasBeenSet = true;
251 m_enableTrace = value;
252 }
254 SetEnableTrace(value);
255 return *this;
256 }
258
260
263 inline bool GetEndSession() const { return m_endSession; }
264 inline bool EndSessionHasBeenSet() const { return m_endSessionHasBeenSet; }
265 inline void SetEndSession(bool value) {
266 m_endSessionHasBeenSet = true;
267 m_endSession = value;
268 }
270 SetEndSession(value);
271 return *this;
272 }
274
276
282 inline const Aws::String& GetFoundationModel() const { return m_foundationModel; }
283 inline bool FoundationModelHasBeenSet() const { return m_foundationModelHasBeenSet; }
284 template <typename FoundationModelT = Aws::String>
286 m_foundationModelHasBeenSet = true;
287 m_foundationModel = std::forward<FoundationModelT>(value);
288 }
289 template <typename FoundationModelT = Aws::String>
291 SetFoundationModel(std::forward<FoundationModelT>(value));
292 return *this;
293 }
295
297
302 inline const GuardrailConfigurationWithArn& GetGuardrailConfiguration() const { return m_guardrailConfiguration; }
303 inline bool GuardrailConfigurationHasBeenSet() const { return m_guardrailConfigurationHasBeenSet; }
304 template <typename GuardrailConfigurationT = GuardrailConfigurationWithArn>
306 m_guardrailConfigurationHasBeenSet = true;
307 m_guardrailConfiguration = std::forward<GuardrailConfigurationT>(value);
308 }
309 template <typename GuardrailConfigurationT = GuardrailConfigurationWithArn>
311 SetGuardrailConfiguration(std::forward<GuardrailConfigurationT>(value));
312 return *this;
313 }
315
317
325 inline int GetIdleSessionTTLInSeconds() const { return m_idleSessionTTLInSeconds; }
326 inline bool IdleSessionTTLInSecondsHasBeenSet() const { return m_idleSessionTTLInSecondsHasBeenSet; }
327 inline void SetIdleSessionTTLInSeconds(int value) {
328 m_idleSessionTTLInSecondsHasBeenSet = true;
329 m_idleSessionTTLInSeconds = value;
330 }
333 return *this;
334 }
336
338
348 inline const InlineSessionState& GetInlineSessionState() const { return m_inlineSessionState; }
349 inline bool InlineSessionStateHasBeenSet() const { return m_inlineSessionStateHasBeenSet; }
350 template <typename InlineSessionStateT = InlineSessionState>
352 m_inlineSessionStateHasBeenSet = true;
353 m_inlineSessionState = std::forward<InlineSessionStateT>(value);
354 }
355 template <typename InlineSessionStateT = InlineSessionState>
357 SetInlineSessionState(std::forward<InlineSessionStateT>(value));
358 return *this;
359 }
361
363
368 inline const Aws::String& GetInputText() const { return m_inputText; }
369 inline bool InputTextHasBeenSet() const { return m_inputTextHasBeenSet; }
370 template <typename InputTextT = Aws::String>
371 void SetInputText(InputTextT&& value) {
372 m_inputTextHasBeenSet = true;
373 m_inputText = std::forward<InputTextT>(value);
374 }
375 template <typename InputTextT = Aws::String>
377 SetInputText(std::forward<InputTextT>(value));
378 return *this;
379 }
381
383
387 inline const Aws::String& GetInstruction() const { return m_instruction; }
388 inline bool InstructionHasBeenSet() const { return m_instructionHasBeenSet; }
389 template <typename InstructionT = Aws::String>
391 m_instructionHasBeenSet = true;
392 m_instruction = std::forward<InstructionT>(value);
393 }
394 template <typename InstructionT = Aws::String>
396 SetInstruction(std::forward<InstructionT>(value));
397 return *this;
398 }
400
402
405 inline const Aws::Vector<KnowledgeBase>& GetKnowledgeBases() const { return m_knowledgeBases; }
406 inline bool KnowledgeBasesHasBeenSet() const { return m_knowledgeBasesHasBeenSet; }
407 template <typename KnowledgeBasesT = Aws::Vector<KnowledgeBase>>
409 m_knowledgeBasesHasBeenSet = true;
410 m_knowledgeBases = std::forward<KnowledgeBasesT>(value);
411 }
412 template <typename KnowledgeBasesT = Aws::Vector<KnowledgeBase>>
414 SetKnowledgeBases(std::forward<KnowledgeBasesT>(value));
415 return *this;
416 }
417 template <typename KnowledgeBasesT = KnowledgeBase>
419 m_knowledgeBasesHasBeenSet = true;
420 m_knowledgeBases.emplace_back(std::forward<KnowledgeBasesT>(value));
421 return *this;
422 }
424
426
430 inline OrchestrationType GetOrchestrationType() const { return m_orchestrationType; }
431 inline bool OrchestrationTypeHasBeenSet() const { return m_orchestrationTypeHasBeenSet; }
433 m_orchestrationTypeHasBeenSet = true;
434 m_orchestrationType = value;
435 }
438 return *this;
439 }
441
443
450 inline const PromptCreationConfigurations& GetPromptCreationConfigurations() const { return m_promptCreationConfigurations; }
451 inline bool PromptCreationConfigurationsHasBeenSet() const { return m_promptCreationConfigurationsHasBeenSet; }
452 template <typename PromptCreationConfigurationsT = PromptCreationConfigurations>
454 m_promptCreationConfigurationsHasBeenSet = true;
455 m_promptCreationConfigurations = std::forward<PromptCreationConfigurationsT>(value);
456 }
457 template <typename PromptCreationConfigurationsT = PromptCreationConfigurations>
459 SetPromptCreationConfigurations(std::forward<PromptCreationConfigurationsT>(value));
460 return *this;
461 }
463
465
469 inline const PromptOverrideConfiguration& GetPromptOverrideConfiguration() const { return m_promptOverrideConfiguration; }
470 inline bool PromptOverrideConfigurationHasBeenSet() const { return m_promptOverrideConfigurationHasBeenSet; }
471 template <typename PromptOverrideConfigurationT = PromptOverrideConfiguration>
473 m_promptOverrideConfigurationHasBeenSet = true;
474 m_promptOverrideConfiguration = std::forward<PromptOverrideConfigurationT>(value);
475 }
476 template <typename PromptOverrideConfigurationT = PromptOverrideConfiguration>
478 SetPromptOverrideConfiguration(std::forward<PromptOverrideConfigurationT>(value));
479 return *this;
480 }
482
484
488 inline const Aws::String& GetSessionId() const { return m_sessionId; }
489 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
490 template <typename SessionIdT = Aws::String>
491 void SetSessionId(SessionIdT&& value) {
492 m_sessionIdHasBeenSet = true;
493 m_sessionId = std::forward<SessionIdT>(value);
494 }
495 template <typename SessionIdT = Aws::String>
497 SetSessionId(std::forward<SessionIdT>(value));
498 return *this;
499 }
501
503
508 inline const StreamingConfigurations& GetStreamingConfigurations() const { return m_streamingConfigurations; }
509 inline bool StreamingConfigurationsHasBeenSet() const { return m_streamingConfigurationsHasBeenSet; }
510 template <typename StreamingConfigurationsT = StreamingConfigurations>
512 m_streamingConfigurationsHasBeenSet = true;
513 m_streamingConfigurations = std::forward<StreamingConfigurationsT>(value);
514 }
515 template <typename StreamingConfigurationsT = StreamingConfigurations>
517 SetStreamingConfigurations(std::forward<StreamingConfigurationsT>(value));
518 return *this;
519 }
521 private:
522 Aws::Vector<AgentActionGroup> m_actionGroups;
523
525
526 Aws::String m_agentName;
527
528 InlineBedrockModelConfigurations m_bedrockModelConfigurations;
529
530 Aws::Vector<CollaboratorConfiguration> m_collaboratorConfigurations;
531
532 Aws::Vector<Collaborator> m_collaborators;
533
534 CustomOrchestration m_customOrchestration;
535
536 Aws::String m_customerEncryptionKeyArn;
537
538 bool m_enableTrace{false};
539
540 bool m_endSession{false};
541
542 Aws::String m_foundationModel;
543
544 GuardrailConfigurationWithArn m_guardrailConfiguration;
545
546 int m_idleSessionTTLInSeconds{0};
547
548 InlineSessionState m_inlineSessionState;
549
550 Aws::String m_inputText;
551
552 Aws::String m_instruction;
553
554 Aws::Vector<KnowledgeBase> m_knowledgeBases;
555
557
558 PromptCreationConfigurations m_promptCreationConfigurations;
559
560 PromptOverrideConfiguration m_promptOverrideConfiguration;
561
562 Aws::String m_sessionId;
563
564 StreamingConfigurations m_streamingConfigurations;
565 InvokeInlineAgentHandler m_handler;
566 Aws::Utils::Event::EventStreamDecoder m_decoder{Utils::Event::EventStreamDecoder(&m_handler)};
567
568 bool m_actionGroupsHasBeenSet = false;
569 bool m_agentCollaborationHasBeenSet = false;
570 bool m_agentNameHasBeenSet = false;
571 bool m_bedrockModelConfigurationsHasBeenSet = false;
572 bool m_collaboratorConfigurationsHasBeenSet = false;
573 bool m_collaboratorsHasBeenSet = false;
574 bool m_customOrchestrationHasBeenSet = false;
575 bool m_customerEncryptionKeyArnHasBeenSet = false;
576 bool m_enableTraceHasBeenSet = false;
577 bool m_endSessionHasBeenSet = false;
578 bool m_foundationModelHasBeenSet = false;
579 bool m_guardrailConfigurationHasBeenSet = false;
580 bool m_idleSessionTTLInSecondsHasBeenSet = false;
581 bool m_inlineSessionStateHasBeenSet = false;
582 bool m_inputTextHasBeenSet = false;
583 bool m_instructionHasBeenSet = false;
584 bool m_knowledgeBasesHasBeenSet = false;
585 bool m_orchestrationTypeHasBeenSet = false;
586 bool m_promptCreationConfigurationsHasBeenSet = false;
587 bool m_promptOverrideConfigurationHasBeenSet = false;
588 bool m_sessionIdHasBeenSet = false;
589 bool m_streamingConfigurationsHasBeenSet = false;
590};
591
592} // namespace Model
593} // namespace BedrockAgentRuntime
594} // namespace Aws
void SetBedrockModelConfigurations(BedrockModelConfigurationsT &&value)
InvokeInlineAgentRequest & WithCollaborators(CollaboratorsT &&value)
InvokeInlineAgentRequest & WithActionGroups(ActionGroupsT &&value)
InvokeInlineAgentRequest & WithKnowledgeBases(KnowledgeBasesT &&value)
InvokeInlineAgentRequest & AddActionGroups(ActionGroupsT &&value)
InvokeInlineAgentRequest & WithInlineSessionState(InlineSessionStateT &&value)
InvokeInlineAgentRequest & WithEventStreamHandler(const InvokeInlineAgentHandler &value)
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
InvokeInlineAgentRequest & AddCollaborators(CollaboratorsT &&value)
InvokeInlineAgentRequest & WithGuardrailConfiguration(GuardrailConfigurationT &&value)
void SetPromptCreationConfigurations(PromptCreationConfigurationsT &&value)
const Aws::Vector< AgentActionGroup > & GetActionGroups() const
AWS_BEDROCKAGENTRUNTIME_API InvokeInlineAgentRequest()=default
InvokeInlineAgentRequest & WithOrchestrationType(OrchestrationType value)
InvokeInlineAgentRequest & WithBedrockModelConfigurations(BedrockModelConfigurationsT &&value)
const StreamingConfigurations & GetStreamingConfigurations() const
InvokeInlineAgentRequest & WithStreamingConfigurations(StreamingConfigurationsT &&value)
InvokeInlineAgentRequest & AddCollaboratorConfigurations(CollaboratorConfigurationsT &&value)
const InlineBedrockModelConfigurations & GetBedrockModelConfigurations() const
void SetCollaboratorConfigurations(CollaboratorConfigurationsT &&value)
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
void SetPromptOverrideConfiguration(PromptOverrideConfigurationT &&value)
InvokeInlineAgentRequest & WithCustomOrchestration(CustomOrchestrationT &&value)
const Aws::Vector< CollaboratorConfiguration > & GetCollaboratorConfigurations() const
const PromptOverrideConfiguration & GetPromptOverrideConfiguration() const
InvokeInlineAgentRequest & WithCustomerEncryptionKeyArn(CustomerEncryptionKeyArnT &&value)
InvokeInlineAgentRequest & WithCollaboratorConfigurations(CollaboratorConfigurationsT &&value)
InvokeInlineAgentRequest & WithSessionId(SessionIdT &&value)
void SetCustomerEncryptionKeyArn(CustomerEncryptionKeyArnT &&value)
InvokeInlineAgentRequest & WithAgentName(AgentNameT &&value)
const Aws::Vector< KnowledgeBase > & GetKnowledgeBases() const
InvokeInlineAgentRequest & WithPromptCreationConfigurations(PromptCreationConfigurationsT &&value)
InvokeInlineAgentRequest & WithInputText(InputTextT &&value)
InvokeInlineAgentRequest & WithFoundationModel(FoundationModelT &&value)
const GuardrailConfigurationWithArn & GetGuardrailConfiguration() const
InvokeInlineAgentRequest & AddKnowledgeBases(KnowledgeBasesT &&value)
void SetEventStreamHandler(const InvokeInlineAgentHandler &value)
InvokeInlineAgentRequest & WithAgentCollaboration(AgentCollaboration value)
InvokeInlineAgentRequest & WithPromptOverrideConfiguration(PromptOverrideConfigurationT &&value)
InvokeInlineAgentRequest & WithInstruction(InstructionT &&value)
const PromptCreationConfigurations & GetPromptCreationConfigurations() const
const Aws::Vector< Collaborator > & GetCollaborators() const
void ResetEventStreamHandler(EventStreamHandler *handler)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector