AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
InvokeFlowRequest.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/FlowInput.h>
10#include <aws/bedrock-agent-runtime/model/InvokeFlowHandler.h>
11#include <aws/bedrock-agent-runtime/model/ModelPerformanceConfiguration.h>
12#include <aws/core/utils/event/EventStreamDecoder.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace BedrockAgentRuntime {
20namespace Model {
21
25 public:
26 AWS_BEDROCKAGENTRUNTIME_API InvokeFlowRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "InvokeFlow"; }
33
34 inline virtual bool HasEventStreamResponse() const override { return true; }
35 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
36
41
45 inline InvokeFlowHandler& GetEventStreamHandler() { return m_handler; }
46
50 inline void SetEventStreamHandler(const InvokeFlowHandler& value) {
51 m_handler = value;
52 m_decoder.ResetEventStreamHandler(&m_handler);
53 }
54
60 return *this;
61 }
62
64
70 inline bool GetEnableTrace() const { return m_enableTrace; }
71 inline bool EnableTraceHasBeenSet() const { return m_enableTraceHasBeenSet; }
72 inline void SetEnableTrace(bool value) {
73 m_enableTraceHasBeenSet = true;
74 m_enableTrace = value;
75 }
76 inline InvokeFlowRequest& WithEnableTrace(bool value) {
77 SetEnableTrace(value);
78 return *this;
79 }
81
83
87 inline const Aws::String& GetExecutionId() const { return m_executionId; }
88 inline bool ExecutionIdHasBeenSet() const { return m_executionIdHasBeenSet; }
89 template <typename ExecutionIdT = Aws::String>
91 m_executionIdHasBeenSet = true;
92 m_executionId = std::forward<ExecutionIdT>(value);
93 }
94 template <typename ExecutionIdT = Aws::String>
96 SetExecutionId(std::forward<ExecutionIdT>(value));
97 return *this;
98 }
100
102
105 inline const Aws::String& GetFlowAliasIdentifier() const { return m_flowAliasIdentifier; }
106 inline bool FlowAliasIdentifierHasBeenSet() const { return m_flowAliasIdentifierHasBeenSet; }
107 template <typename FlowAliasIdentifierT = Aws::String>
109 m_flowAliasIdentifierHasBeenSet = true;
110 m_flowAliasIdentifier = std::forward<FlowAliasIdentifierT>(value);
111 }
112 template <typename FlowAliasIdentifierT = Aws::String>
114 SetFlowAliasIdentifier(std::forward<FlowAliasIdentifierT>(value));
115 return *this;
116 }
118
120
123 inline const Aws::String& GetFlowIdentifier() const { return m_flowIdentifier; }
124 inline bool FlowIdentifierHasBeenSet() const { return m_flowIdentifierHasBeenSet; }
125 template <typename FlowIdentifierT = Aws::String>
127 m_flowIdentifierHasBeenSet = true;
128 m_flowIdentifier = std::forward<FlowIdentifierT>(value);
129 }
130 template <typename FlowIdentifierT = Aws::String>
132 SetFlowIdentifier(std::forward<FlowIdentifierT>(value));
133 return *this;
134 }
136
138
142 inline const Aws::Vector<FlowInput>& GetInputs() const { return m_inputs; }
143 inline bool InputsHasBeenSet() const { return m_inputsHasBeenSet; }
144 template <typename InputsT = Aws::Vector<FlowInput>>
145 void SetInputs(InputsT&& value) {
146 m_inputsHasBeenSet = true;
147 m_inputs = std::forward<InputsT>(value);
148 }
149 template <typename InputsT = Aws::Vector<FlowInput>>
151 SetInputs(std::forward<InputsT>(value));
152 return *this;
153 }
154 template <typename InputsT = FlowInput>
156 m_inputsHasBeenSet = true;
157 m_inputs.emplace_back(std::forward<InputsT>(value));
158 return *this;
159 }
161
163
166 inline const ModelPerformanceConfiguration& GetModelPerformanceConfiguration() const { return m_modelPerformanceConfiguration; }
167 inline bool ModelPerformanceConfigurationHasBeenSet() const { return m_modelPerformanceConfigurationHasBeenSet; }
168 template <typename ModelPerformanceConfigurationT = ModelPerformanceConfiguration>
170 m_modelPerformanceConfigurationHasBeenSet = true;
171 m_modelPerformanceConfiguration = std::forward<ModelPerformanceConfigurationT>(value);
172 }
173 template <typename ModelPerformanceConfigurationT = ModelPerformanceConfiguration>
175 SetModelPerformanceConfiguration(std::forward<ModelPerformanceConfigurationT>(value));
176 return *this;
177 }
179 private:
180 bool m_enableTrace{false};
181
182 Aws::String m_executionId;
183
184 Aws::String m_flowAliasIdentifier;
185
186 Aws::String m_flowIdentifier;
187
188 Aws::Vector<FlowInput> m_inputs;
189
190 ModelPerformanceConfiguration m_modelPerformanceConfiguration;
191 InvokeFlowHandler m_handler;
193
194 bool m_enableTraceHasBeenSet = false;
195 bool m_executionIdHasBeenSet = false;
196 bool m_flowAliasIdentifierHasBeenSet = false;
197 bool m_flowIdentifierHasBeenSet = false;
198 bool m_inputsHasBeenSet = false;
199 bool m_modelPerformanceConfigurationHasBeenSet = false;
200};
201
202} // namespace Model
203} // namespace BedrockAgentRuntime
204} // namespace Aws
InvokeFlowRequest & WithExecutionId(ExecutionIdT &&value)
InvokeFlowRequest & AddInputs(InputsT &&value)
const Aws::Vector< FlowInput > & GetInputs() const
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
InvokeFlowRequest & WithInputs(InputsT &&value)
void SetModelPerformanceConfiguration(ModelPerformanceConfigurationT &&value)
AWS_BEDROCKAGENTRUNTIME_API InvokeFlowRequest()=default
InvokeFlowRequest & WithModelPerformanceConfiguration(ModelPerformanceConfigurationT &&value)
InvokeFlowRequest & WithFlowAliasIdentifier(FlowAliasIdentifierT &&value)
void SetFlowAliasIdentifier(FlowAliasIdentifierT &&value)
InvokeFlowRequest & WithFlowIdentifier(FlowIdentifierT &&value)
const ModelPerformanceConfiguration & GetModelPerformanceConfiguration() const
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
virtual const char * GetServiceRequestName() const override
InvokeFlowRequest & WithEventStreamHandler(const InvokeFlowHandler &value)
void SetEventStreamHandler(const InvokeFlowHandler &value)
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