AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ConverseStreamRequest.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/BedrockRuntimeRequest.h>
9#include <aws/bedrock-runtime/model/ConverseStreamHandler.h>
10#include <aws/core/utils/event/EventStreamDecoder.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/bedrock-runtime/model/InferenceConfiguration.h>
14#include <aws/bedrock-runtime/model/ToolConfiguration.h>
15#include <aws/bedrock-runtime/model/GuardrailStreamConfiguration.h>
16#include <aws/core/utils/Document.h>
17#include <aws/bedrock-runtime/model/Message.h>
18#include <aws/bedrock-runtime/model/SystemContentBlock.h>
19#include <utility>
20
21namespace Aws
22{
23namespace BedrockRuntime
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_BEDROCKRUNTIME_API ConverseStreamRequest();
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "ConverseStream"; }
40
41 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
42
47
51 inline const ConverseStreamHandler& GetEventStreamHandler() const { return m_handler; }
52
56 inline void SetEventStreamHandler(const ConverseStreamHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); }
57
62
63
65
89 inline const Aws::String& GetModelId() const{ return m_modelId; }
90 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
91 inline void SetModelId(const Aws::String& value) { m_modelIdHasBeenSet = true; m_modelId = value; }
92 inline void SetModelId(Aws::String&& value) { m_modelIdHasBeenSet = true; m_modelId = std::move(value); }
93 inline void SetModelId(const char* value) { m_modelIdHasBeenSet = true; m_modelId.assign(value); }
94 inline ConverseStreamRequest& WithModelId(const Aws::String& value) { SetModelId(value); return *this;}
95 inline ConverseStreamRequest& WithModelId(Aws::String&& value) { SetModelId(std::move(value)); return *this;}
96 inline ConverseStreamRequest& WithModelId(const char* value) { SetModelId(value); return *this;}
98
100
103 inline const Aws::Vector<Message>& GetMessages() const{ return m_messages; }
104 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
105 inline void SetMessages(const Aws::Vector<Message>& value) { m_messagesHasBeenSet = true; m_messages = value; }
106 inline void SetMessages(Aws::Vector<Message>&& value) { m_messagesHasBeenSet = true; m_messages = std::move(value); }
107 inline ConverseStreamRequest& WithMessages(const Aws::Vector<Message>& value) { SetMessages(value); return *this;}
108 inline ConverseStreamRequest& WithMessages(Aws::Vector<Message>&& value) { SetMessages(std::move(value)); return *this;}
109 inline ConverseStreamRequest& AddMessages(const Message& value) { m_messagesHasBeenSet = true; m_messages.push_back(value); return *this; }
110 inline ConverseStreamRequest& AddMessages(Message&& value) { m_messagesHasBeenSet = true; m_messages.push_back(std::move(value)); return *this; }
112
114
117 inline const Aws::Vector<SystemContentBlock>& GetSystem() const{ return m_system; }
118 inline bool SystemHasBeenSet() const { return m_systemHasBeenSet; }
119 inline void SetSystem(const Aws::Vector<SystemContentBlock>& value) { m_systemHasBeenSet = true; m_system = value; }
120 inline void SetSystem(Aws::Vector<SystemContentBlock>&& value) { m_systemHasBeenSet = true; m_system = std::move(value); }
121 inline ConverseStreamRequest& WithSystem(const Aws::Vector<SystemContentBlock>& value) { SetSystem(value); return *this;}
122 inline ConverseStreamRequest& WithSystem(Aws::Vector<SystemContentBlock>&& value) { SetSystem(std::move(value)); return *this;}
123 inline ConverseStreamRequest& AddSystem(const SystemContentBlock& value) { m_systemHasBeenSet = true; m_system.push_back(value); return *this; }
124 inline ConverseStreamRequest& AddSystem(SystemContentBlock&& value) { m_systemHasBeenSet = true; m_system.push_back(std::move(value)); return *this; }
126
128
134 inline const InferenceConfiguration& GetInferenceConfig() const{ return m_inferenceConfig; }
135 inline bool InferenceConfigHasBeenSet() const { return m_inferenceConfigHasBeenSet; }
136 inline void SetInferenceConfig(const InferenceConfiguration& value) { m_inferenceConfigHasBeenSet = true; m_inferenceConfig = value; }
137 inline void SetInferenceConfig(InferenceConfiguration&& value) { m_inferenceConfigHasBeenSet = true; m_inferenceConfig = std::move(value); }
139 inline ConverseStreamRequest& WithInferenceConfig(InferenceConfiguration&& value) { SetInferenceConfig(std::move(value)); return *this;}
141
143
148 inline const ToolConfiguration& GetToolConfig() const{ return m_toolConfig; }
149 inline bool ToolConfigHasBeenSet() const { return m_toolConfigHasBeenSet; }
150 inline void SetToolConfig(const ToolConfiguration& value) { m_toolConfigHasBeenSet = true; m_toolConfig = value; }
151 inline void SetToolConfig(ToolConfiguration&& value) { m_toolConfigHasBeenSet = true; m_toolConfig = std::move(value); }
152 inline ConverseStreamRequest& WithToolConfig(const ToolConfiguration& value) { SetToolConfig(value); return *this;}
153 inline ConverseStreamRequest& WithToolConfig(ToolConfiguration&& value) { SetToolConfig(std::move(value)); return *this;}
155
157
161 inline const GuardrailStreamConfiguration& GetGuardrailConfig() const{ return m_guardrailConfig; }
162 inline bool GuardrailConfigHasBeenSet() const { return m_guardrailConfigHasBeenSet; }
163 inline void SetGuardrailConfig(const GuardrailStreamConfiguration& value) { m_guardrailConfigHasBeenSet = true; m_guardrailConfig = value; }
164 inline void SetGuardrailConfig(GuardrailStreamConfiguration&& value) { m_guardrailConfigHasBeenSet = true; m_guardrailConfig = std::move(value); }
168
170
175 inline Aws::Utils::DocumentView GetAdditionalModelRequestFields() const{ return m_additionalModelRequestFields; }
176 inline bool AdditionalModelRequestFieldsHasBeenSet() const { return m_additionalModelRequestFieldsHasBeenSet; }
177 inline void SetAdditionalModelRequestFields(const Aws::Utils::Document& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = value; }
178 inline void SetAdditionalModelRequestFields(Aws::Utils::Document&& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = std::move(value); }
182
184
197 inline const Aws::Vector<Aws::String>& GetAdditionalModelResponseFieldPaths() const{ return m_additionalModelResponseFieldPaths; }
198 inline bool AdditionalModelResponseFieldPathsHasBeenSet() const { return m_additionalModelResponseFieldPathsHasBeenSet; }
199 inline void SetAdditionalModelResponseFieldPaths(const Aws::Vector<Aws::String>& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths = value; }
200 inline void SetAdditionalModelResponseFieldPaths(Aws::Vector<Aws::String>&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths = std::move(value); }
203 inline ConverseStreamRequest& AddAdditionalModelResponseFieldPaths(const Aws::String& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(value); return *this; }
204 inline ConverseStreamRequest& AddAdditionalModelResponseFieldPaths(Aws::String&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(std::move(value)); return *this; }
205 inline ConverseStreamRequest& AddAdditionalModelResponseFieldPaths(const char* value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(value); return *this; }
207 private:
208
209 Aws::String m_modelId;
210 bool m_modelIdHasBeenSet = false;
211
212 Aws::Vector<Message> m_messages;
213 bool m_messagesHasBeenSet = false;
214
216 bool m_systemHasBeenSet = false;
217
218 InferenceConfiguration m_inferenceConfig;
219 bool m_inferenceConfigHasBeenSet = false;
220
221 ToolConfiguration m_toolConfig;
222 bool m_toolConfigHasBeenSet = false;
223
224 GuardrailStreamConfiguration m_guardrailConfig;
225 bool m_guardrailConfigHasBeenSet = false;
226
227 Aws::Utils::Document m_additionalModelRequestFields;
228 bool m_additionalModelRequestFieldsHasBeenSet = false;
229
230 Aws::Vector<Aws::String> m_additionalModelResponseFieldPaths;
231 bool m_additionalModelResponseFieldPathsHasBeenSet = false;
232 ConverseStreamHandler m_handler;
234
235 };
236
237} // namespace Model
238} // namespace BedrockRuntime
239} // namespace Aws
ConverseStreamRequest & WithEventStreamHandler(const ConverseStreamHandler &value)
ConverseStreamRequest & WithAdditionalModelResponseFieldPaths(Aws::Vector< Aws::String > &&value)
const Aws::Vector< SystemContentBlock > & GetSystem() const
void SetMessages(const Aws::Vector< Message > &value)
void SetSystem(Aws::Vector< SystemContentBlock > &&value)
void SetEventStreamHandler(const ConverseStreamHandler &value)
void SetInferenceConfig(InferenceConfiguration &&value)
ConverseStreamRequest & WithAdditionalModelRequestFields(Aws::Utils::Document &&value)
ConverseStreamRequest & AddSystem(const SystemContentBlock &value)
const Aws::Vector< Aws::String > & GetAdditionalModelResponseFieldPaths() const
void SetAdditionalModelResponseFieldPaths(Aws::Vector< Aws::String > &&value)
ConverseStreamRequest & WithMessages(Aws::Vector< Message > &&value)
ConverseStreamRequest & WithGuardrailConfig(const GuardrailStreamConfiguration &value)
void SetSystem(const Aws::Vector< SystemContentBlock > &value)
ConverseStreamRequest & WithMessages(const Aws::Vector< Message > &value)
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
ConverseStreamRequest & WithAdditionalModelResponseFieldPaths(const Aws::Vector< Aws::String > &value)
ConverseStreamRequest & WithSystem(const Aws::Vector< SystemContentBlock > &value)
ConverseStreamRequest & WithToolConfig(ToolConfiguration &&value)
ConverseStreamRequest & AddAdditionalModelResponseFieldPaths(const char *value)
ConverseStreamRequest & WithAdditionalModelRequestFields(const Aws::Utils::Document &value)
ConverseStreamRequest & WithToolConfig(const ToolConfiguration &value)
ConverseStreamRequest & WithModelId(const Aws::String &value)
ConverseStreamRequest & WithInferenceConfig(InferenceConfiguration &&value)
const ConverseStreamHandler & GetEventStreamHandler() const
ConverseStreamRequest & WithGuardrailConfig(GuardrailStreamConfiguration &&value)
void SetInferenceConfig(const InferenceConfiguration &value)
void SetGuardrailConfig(const GuardrailStreamConfiguration &value)
const GuardrailStreamConfiguration & GetGuardrailConfig() const
void SetAdditionalModelRequestFields(const Aws::Utils::Document &value)
const Aws::Vector< Message > & GetMessages() const
ConverseStreamRequest & WithModelId(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
ConverseStreamRequest & AddAdditionalModelResponseFieldPaths(const Aws::String &value)
void SetAdditionalModelResponseFieldPaths(const Aws::Vector< Aws::String > &value)
const InferenceConfiguration & GetInferenceConfig() const
ConverseStreamRequest & AddMessages(const Message &value)
ConverseStreamRequest & AddAdditionalModelResponseFieldPaths(Aws::String &&value)
void SetToolConfig(const ToolConfiguration &value)
ConverseStreamRequest & AddMessages(Message &&value)
ConverseStreamRequest & WithSystem(Aws::Vector< SystemContentBlock > &&value)
ConverseStreamRequest & WithInferenceConfig(const InferenceConfiguration &value)
AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override
ConverseStreamRequest & WithModelId(const char *value)
void SetAdditionalModelRequestFields(Aws::Utils::Document &&value)
ConverseStreamRequest & AddSystem(SystemContentBlock &&value)
void SetGuardrailConfig(GuardrailStreamConfiguration &&value)
Aws::Utils::DocumentView GetAdditionalModelRequestFields() const
void ResetEventStreamHandler(EventStreamHandler *handler)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector