AWS SDK for C++

AWS SDK for C++ Version 1.11.609

Loading...
Searching...
No Matches
ConverseRequest.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/BedrockRuntimeRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/bedrock-runtime/model/InferenceConfiguration.h>
12#include <aws/bedrock-runtime/model/ToolConfiguration.h>
13#include <aws/bedrock-runtime/model/GuardrailConfiguration.h>
14#include <aws/core/utils/Document.h>
15#include <aws/core/utils/memory/stl/AWSMap.h>
16#include <aws/bedrock-runtime/model/PerformanceConfiguration.h>
17#include <aws/bedrock-runtime/model/Message.h>
18#include <aws/bedrock-runtime/model/SystemContentBlock.h>
19#include <aws/bedrock-runtime/model/PromptVariableValues.h>
20#include <utility>
21
22namespace Aws
23{
24namespace BedrockRuntime
25{
26namespace Model
27{
28
32 {
33 public:
34 AWS_BEDROCKRUNTIME_API ConverseRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "Converse"; }
41
42 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
43
44
46
73 inline const Aws::String& GetModelId() const { return m_modelId; }
74 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
75 template<typename ModelIdT = Aws::String>
76 void SetModelId(ModelIdT&& value) { m_modelIdHasBeenSet = true; m_modelId = std::forward<ModelIdT>(value); }
77 template<typename ModelIdT = Aws::String>
78 ConverseRequest& WithModelId(ModelIdT&& value) { SetModelId(std::forward<ModelIdT>(value)); return *this;}
80
82
85 inline const Aws::Vector<Message>& GetMessages() const { return m_messages; }
86 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
87 template<typename MessagesT = Aws::Vector<Message>>
88 void SetMessages(MessagesT&& value) { m_messagesHasBeenSet = true; m_messages = std::forward<MessagesT>(value); }
89 template<typename MessagesT = Aws::Vector<Message>>
90 ConverseRequest& WithMessages(MessagesT&& value) { SetMessages(std::forward<MessagesT>(value)); return *this;}
91 template<typename MessagesT = Message>
92 ConverseRequest& AddMessages(MessagesT&& value) { m_messagesHasBeenSet = true; m_messages.emplace_back(std::forward<MessagesT>(value)); return *this; }
94
96
100 inline const Aws::Vector<SystemContentBlock>& GetSystem() const { return m_system; }
101 inline bool SystemHasBeenSet() const { return m_systemHasBeenSet; }
102 template<typename SystemT = Aws::Vector<SystemContentBlock>>
103 void SetSystem(SystemT&& value) { m_systemHasBeenSet = true; m_system = std::forward<SystemT>(value); }
104 template<typename SystemT = Aws::Vector<SystemContentBlock>>
105 ConverseRequest& WithSystem(SystemT&& value) { SetSystem(std::forward<SystemT>(value)); return *this;}
106 template<typename SystemT = SystemContentBlock>
107 ConverseRequest& AddSystem(SystemT&& value) { m_systemHasBeenSet = true; m_system.emplace_back(std::forward<SystemT>(value)); return *this; }
109
111
117 inline const InferenceConfiguration& GetInferenceConfig() const { return m_inferenceConfig; }
118 inline bool InferenceConfigHasBeenSet() const { return m_inferenceConfigHasBeenSet; }
119 template<typename InferenceConfigT = InferenceConfiguration>
120 void SetInferenceConfig(InferenceConfigT&& value) { m_inferenceConfigHasBeenSet = true; m_inferenceConfig = std::forward<InferenceConfigT>(value); }
121 template<typename InferenceConfigT = InferenceConfiguration>
122 ConverseRequest& WithInferenceConfig(InferenceConfigT&& value) { SetInferenceConfig(std::forward<InferenceConfigT>(value)); return *this;}
124
126
133 inline const ToolConfiguration& GetToolConfig() const { return m_toolConfig; }
134 inline bool ToolConfigHasBeenSet() const { return m_toolConfigHasBeenSet; }
135 template<typename ToolConfigT = ToolConfiguration>
136 void SetToolConfig(ToolConfigT&& value) { m_toolConfigHasBeenSet = true; m_toolConfig = std::forward<ToolConfigT>(value); }
137 template<typename ToolConfigT = ToolConfiguration>
138 ConverseRequest& WithToolConfig(ToolConfigT&& value) { SetToolConfig(std::forward<ToolConfigT>(value)); return *this;}
140
142
150 inline const GuardrailConfiguration& GetGuardrailConfig() const { return m_guardrailConfig; }
151 inline bool GuardrailConfigHasBeenSet() const { return m_guardrailConfigHasBeenSet; }
152 template<typename GuardrailConfigT = GuardrailConfiguration>
153 void SetGuardrailConfig(GuardrailConfigT&& value) { m_guardrailConfigHasBeenSet = true; m_guardrailConfig = std::forward<GuardrailConfigT>(value); }
154 template<typename GuardrailConfigT = GuardrailConfiguration>
155 ConverseRequest& WithGuardrailConfig(GuardrailConfigT&& value) { SetGuardrailConfig(std::forward<GuardrailConfigT>(value)); return *this;}
157
159
167 inline Aws::Utils::DocumentView GetAdditionalModelRequestFields() const { return m_additionalModelRequestFields; }
168 inline bool AdditionalModelRequestFieldsHasBeenSet() const { return m_additionalModelRequestFieldsHasBeenSet; }
169 template<typename AdditionalModelRequestFieldsT = Aws::Utils::Document>
170 void SetAdditionalModelRequestFields(AdditionalModelRequestFieldsT&& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = std::forward<AdditionalModelRequestFieldsT>(value); }
171 template<typename AdditionalModelRequestFieldsT = Aws::Utils::Document>
172 ConverseRequest& WithAdditionalModelRequestFields(AdditionalModelRequestFieldsT&& value) { SetAdditionalModelRequestFields(std::forward<AdditionalModelRequestFieldsT>(value)); return *this;}
174
176
182 inline const Aws::Map<Aws::String, PromptVariableValues>& GetPromptVariables() const { return m_promptVariables; }
183 inline bool PromptVariablesHasBeenSet() const { return m_promptVariablesHasBeenSet; }
184 template<typename PromptVariablesT = Aws::Map<Aws::String, PromptVariableValues>>
185 void SetPromptVariables(PromptVariablesT&& value) { m_promptVariablesHasBeenSet = true; m_promptVariables = std::forward<PromptVariablesT>(value); }
186 template<typename PromptVariablesT = Aws::Map<Aws::String, PromptVariableValues>>
187 ConverseRequest& WithPromptVariables(PromptVariablesT&& value) { SetPromptVariables(std::forward<PromptVariablesT>(value)); return *this;}
188 template<typename PromptVariablesKeyT = Aws::String, typename PromptVariablesValueT = PromptVariableValues>
189 ConverseRequest& AddPromptVariables(PromptVariablesKeyT&& key, PromptVariablesValueT&& value) {
190 m_promptVariablesHasBeenSet = true; m_promptVariables.emplace(std::forward<PromptVariablesKeyT>(key), std::forward<PromptVariablesValueT>(value)); return *this;
191 }
193
195
209 inline const Aws::Vector<Aws::String>& GetAdditionalModelResponseFieldPaths() const { return m_additionalModelResponseFieldPaths; }
210 inline bool AdditionalModelResponseFieldPathsHasBeenSet() const { return m_additionalModelResponseFieldPathsHasBeenSet; }
211 template<typename AdditionalModelResponseFieldPathsT = Aws::Vector<Aws::String>>
212 void SetAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths = std::forward<AdditionalModelResponseFieldPathsT>(value); }
213 template<typename AdditionalModelResponseFieldPathsT = Aws::Vector<Aws::String>>
214 ConverseRequest& WithAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT&& value) { SetAdditionalModelResponseFieldPaths(std::forward<AdditionalModelResponseFieldPathsT>(value)); return *this;}
215 template<typename AdditionalModelResponseFieldPathsT = Aws::String>
216 ConverseRequest& AddAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.emplace_back(std::forward<AdditionalModelResponseFieldPathsT>(value)); return *this; }
218
220
223 inline const Aws::Map<Aws::String, Aws::String>& GetRequestMetadata() const { return m_requestMetadata; }
224 inline bool RequestMetadataHasBeenSet() const { return m_requestMetadataHasBeenSet; }
225 template<typename RequestMetadataT = Aws::Map<Aws::String, Aws::String>>
226 void SetRequestMetadata(RequestMetadataT&& value) { m_requestMetadataHasBeenSet = true; m_requestMetadata = std::forward<RequestMetadataT>(value); }
227 template<typename RequestMetadataT = Aws::Map<Aws::String, Aws::String>>
228 ConverseRequest& WithRequestMetadata(RequestMetadataT&& value) { SetRequestMetadata(std::forward<RequestMetadataT>(value)); return *this;}
229 template<typename RequestMetadataKeyT = Aws::String, typename RequestMetadataValueT = Aws::String>
230 ConverseRequest& AddRequestMetadata(RequestMetadataKeyT&& key, RequestMetadataValueT&& value) {
231 m_requestMetadataHasBeenSet = true; m_requestMetadata.emplace(std::forward<RequestMetadataKeyT>(key), std::forward<RequestMetadataValueT>(value)); return *this;
232 }
234
236
239 inline const PerformanceConfiguration& GetPerformanceConfig() const { return m_performanceConfig; }
240 inline bool PerformanceConfigHasBeenSet() const { return m_performanceConfigHasBeenSet; }
241 template<typename PerformanceConfigT = PerformanceConfiguration>
242 void SetPerformanceConfig(PerformanceConfigT&& value) { m_performanceConfigHasBeenSet = true; m_performanceConfig = std::forward<PerformanceConfigT>(value); }
243 template<typename PerformanceConfigT = PerformanceConfiguration>
244 ConverseRequest& WithPerformanceConfig(PerformanceConfigT&& value) { SetPerformanceConfig(std::forward<PerformanceConfigT>(value)); return *this;}
246 private:
247
248 Aws::String m_modelId;
249 bool m_modelIdHasBeenSet = false;
250
251 Aws::Vector<Message> m_messages;
252 bool m_messagesHasBeenSet = false;
253
255 bool m_systemHasBeenSet = false;
256
257 InferenceConfiguration m_inferenceConfig;
258 bool m_inferenceConfigHasBeenSet = false;
259
260 ToolConfiguration m_toolConfig;
261 bool m_toolConfigHasBeenSet = false;
262
263 GuardrailConfiguration m_guardrailConfig;
264 bool m_guardrailConfigHasBeenSet = false;
265
266 Aws::Utils::Document m_additionalModelRequestFields;
267 bool m_additionalModelRequestFieldsHasBeenSet = false;
268
270 bool m_promptVariablesHasBeenSet = false;
271
272 Aws::Vector<Aws::String> m_additionalModelResponseFieldPaths;
273 bool m_additionalModelResponseFieldPathsHasBeenSet = false;
274
275 Aws::Map<Aws::String, Aws::String> m_requestMetadata;
276 bool m_requestMetadataHasBeenSet = false;
277
278 PerformanceConfiguration m_performanceConfig;
279 bool m_performanceConfigHasBeenSet = false;
280 };
281
282} // namespace Model
283} // namespace BedrockRuntime
284} // namespace Aws
ConverseRequest & AddPromptVariables(PromptVariablesKeyT &&key, PromptVariablesValueT &&value)
ConverseRequest & WithAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT &&value)
ConverseRequest & WithGuardrailConfig(GuardrailConfigT &&value)
ConverseRequest & WithAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
ConverseRequest & AddRequestMetadata(RequestMetadataKeyT &&key, RequestMetadataValueT &&value)
Aws::Utils::DocumentView GetAdditionalModelRequestFields() const
virtual const char * GetServiceRequestName() const override
ConverseRequest & WithMessages(MessagesT &&value)
const InferenceConfiguration & GetInferenceConfig() const
void SetPromptVariables(PromptVariablesT &&value)
const GuardrailConfiguration & GetGuardrailConfig() const
ConverseRequest & WithToolConfig(ToolConfigT &&value)
ConverseRequest & WithModelId(ModelIdT &&value)
ConverseRequest & WithSystem(SystemT &&value)
const Aws::Vector< SystemContentBlock > & GetSystem() const
const PerformanceConfiguration & GetPerformanceConfig() const
ConverseRequest & AddSystem(SystemT &&value)
ConverseRequest & AddMessages(MessagesT &&value)
const Aws::Map< Aws::String, PromptVariableValues > & GetPromptVariables() const
ConverseRequest & AddAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetRequestMetadata() const
ConverseRequest & WithInferenceConfig(InferenceConfigT &&value)
void SetRequestMetadata(RequestMetadataT &&value)
ConverseRequest & WithRequestMetadata(RequestMetadataT &&value)
ConverseRequest & WithPromptVariables(PromptVariablesT &&value)
const ToolConfiguration & GetToolConfig() const
void SetPerformanceConfig(PerformanceConfigT &&value)
AWS_BEDROCKRUNTIME_API ConverseRequest()=default
AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override
void SetAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
const Aws::Vector< Message > & GetMessages() const
void SetAdditionalModelResponseFieldPaths(AdditionalModelResponseFieldPathsT &&value)
void SetGuardrailConfig(GuardrailConfigT &&value)
ConverseRequest & WithPerformanceConfig(PerformanceConfigT &&value)
void SetInferenceConfig(InferenceConfigT &&value)
const Aws::Vector< Aws::String > & GetAdditionalModelResponseFieldPaths() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector