AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/bedrock-runtime/model/Message.h>
16#include <aws/bedrock-runtime/model/SystemContentBlock.h>
17#include <utility>
18
19namespace Aws
20{
21namespace BedrockRuntime
22{
23namespace Model
24{
25
29 {
30 public:
31 AWS_BEDROCKRUNTIME_API ConverseRequest();
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "Converse"; }
38
39 AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override;
40
41
43
67 inline const Aws::String& GetModelId() const{ return m_modelId; }
68 inline bool ModelIdHasBeenSet() const { return m_modelIdHasBeenSet; }
69 inline void SetModelId(const Aws::String& value) { m_modelIdHasBeenSet = true; m_modelId = value; }
70 inline void SetModelId(Aws::String&& value) { m_modelIdHasBeenSet = true; m_modelId = std::move(value); }
71 inline void SetModelId(const char* value) { m_modelIdHasBeenSet = true; m_modelId.assign(value); }
72 inline ConverseRequest& WithModelId(const Aws::String& value) { SetModelId(value); return *this;}
73 inline ConverseRequest& WithModelId(Aws::String&& value) { SetModelId(std::move(value)); return *this;}
74 inline ConverseRequest& WithModelId(const char* value) { SetModelId(value); return *this;}
76
78
81 inline const Aws::Vector<Message>& GetMessages() const{ return m_messages; }
82 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
83 inline void SetMessages(const Aws::Vector<Message>& value) { m_messagesHasBeenSet = true; m_messages = value; }
84 inline void SetMessages(Aws::Vector<Message>&& value) { m_messagesHasBeenSet = true; m_messages = std::move(value); }
85 inline ConverseRequest& WithMessages(const Aws::Vector<Message>& value) { SetMessages(value); return *this;}
86 inline ConverseRequest& WithMessages(Aws::Vector<Message>&& value) { SetMessages(std::move(value)); return *this;}
87 inline ConverseRequest& AddMessages(const Message& value) { m_messagesHasBeenSet = true; m_messages.push_back(value); return *this; }
88 inline ConverseRequest& AddMessages(Message&& value) { m_messagesHasBeenSet = true; m_messages.push_back(std::move(value)); return *this; }
90
92
95 inline const Aws::Vector<SystemContentBlock>& GetSystem() const{ return m_system; }
96 inline bool SystemHasBeenSet() const { return m_systemHasBeenSet; }
97 inline void SetSystem(const Aws::Vector<SystemContentBlock>& value) { m_systemHasBeenSet = true; m_system = value; }
98 inline void SetSystem(Aws::Vector<SystemContentBlock>&& value) { m_systemHasBeenSet = true; m_system = std::move(value); }
99 inline ConverseRequest& WithSystem(const Aws::Vector<SystemContentBlock>& value) { SetSystem(value); return *this;}
100 inline ConverseRequest& WithSystem(Aws::Vector<SystemContentBlock>&& value) { SetSystem(std::move(value)); return *this;}
101 inline ConverseRequest& AddSystem(const SystemContentBlock& value) { m_systemHasBeenSet = true; m_system.push_back(value); return *this; }
102 inline ConverseRequest& AddSystem(SystemContentBlock&& value) { m_systemHasBeenSet = true; m_system.push_back(std::move(value)); return *this; }
104
106
112 inline const InferenceConfiguration& GetInferenceConfig() const{ return m_inferenceConfig; }
113 inline bool InferenceConfigHasBeenSet() const { return m_inferenceConfigHasBeenSet; }
114 inline void SetInferenceConfig(const InferenceConfiguration& value) { m_inferenceConfigHasBeenSet = true; m_inferenceConfig = value; }
115 inline void SetInferenceConfig(InferenceConfiguration&& value) { m_inferenceConfigHasBeenSet = true; m_inferenceConfig = std::move(value); }
117 inline ConverseRequest& WithInferenceConfig(InferenceConfiguration&& value) { SetInferenceConfig(std::move(value)); return *this;}
119
121
127 inline const ToolConfiguration& GetToolConfig() const{ return m_toolConfig; }
128 inline bool ToolConfigHasBeenSet() const { return m_toolConfigHasBeenSet; }
129 inline void SetToolConfig(const ToolConfiguration& value) { m_toolConfigHasBeenSet = true; m_toolConfig = value; }
130 inline void SetToolConfig(ToolConfiguration&& value) { m_toolConfigHasBeenSet = true; m_toolConfig = std::move(value); }
131 inline ConverseRequest& WithToolConfig(const ToolConfiguration& value) { SetToolConfig(value); return *this;}
132 inline ConverseRequest& WithToolConfig(ToolConfiguration&& value) { SetToolConfig(std::move(value)); return *this;}
134
136
140 inline const GuardrailConfiguration& GetGuardrailConfig() const{ return m_guardrailConfig; }
141 inline bool GuardrailConfigHasBeenSet() const { return m_guardrailConfigHasBeenSet; }
142 inline void SetGuardrailConfig(const GuardrailConfiguration& value) { m_guardrailConfigHasBeenSet = true; m_guardrailConfig = value; }
143 inline void SetGuardrailConfig(GuardrailConfiguration&& value) { m_guardrailConfigHasBeenSet = true; m_guardrailConfig = std::move(value); }
145 inline ConverseRequest& WithGuardrailConfig(GuardrailConfiguration&& value) { SetGuardrailConfig(std::move(value)); return *this;}
147
149
156 inline Aws::Utils::DocumentView GetAdditionalModelRequestFields() const{ return m_additionalModelRequestFields; }
157 inline bool AdditionalModelRequestFieldsHasBeenSet() const { return m_additionalModelRequestFieldsHasBeenSet; }
158 inline void SetAdditionalModelRequestFields(const Aws::Utils::Document& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = value; }
159 inline void SetAdditionalModelRequestFields(Aws::Utils::Document&& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = std::move(value); }
163
165
177 inline const Aws::Vector<Aws::String>& GetAdditionalModelResponseFieldPaths() const{ return m_additionalModelResponseFieldPaths; }
178 inline bool AdditionalModelResponseFieldPathsHasBeenSet() const { return m_additionalModelResponseFieldPathsHasBeenSet; }
179 inline void SetAdditionalModelResponseFieldPaths(const Aws::Vector<Aws::String>& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths = value; }
180 inline void SetAdditionalModelResponseFieldPaths(Aws::Vector<Aws::String>&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths = std::move(value); }
183 inline ConverseRequest& AddAdditionalModelResponseFieldPaths(const Aws::String& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(value); return *this; }
184 inline ConverseRequest& AddAdditionalModelResponseFieldPaths(Aws::String&& value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(std::move(value)); return *this; }
185 inline ConverseRequest& AddAdditionalModelResponseFieldPaths(const char* value) { m_additionalModelResponseFieldPathsHasBeenSet = true; m_additionalModelResponseFieldPaths.push_back(value); return *this; }
187 private:
188
189 Aws::String m_modelId;
190 bool m_modelIdHasBeenSet = false;
191
192 Aws::Vector<Message> m_messages;
193 bool m_messagesHasBeenSet = false;
194
196 bool m_systemHasBeenSet = false;
197
198 InferenceConfiguration m_inferenceConfig;
199 bool m_inferenceConfigHasBeenSet = false;
200
201 ToolConfiguration m_toolConfig;
202 bool m_toolConfigHasBeenSet = false;
203
204 GuardrailConfiguration m_guardrailConfig;
205 bool m_guardrailConfigHasBeenSet = false;
206
207 Aws::Utils::Document m_additionalModelRequestFields;
208 bool m_additionalModelRequestFieldsHasBeenSet = false;
209
210 Aws::Vector<Aws::String> m_additionalModelResponseFieldPaths;
211 bool m_additionalModelResponseFieldPathsHasBeenSet = false;
212 };
213
214} // namespace Model
215} // namespace BedrockRuntime
216} // namespace Aws
ConverseRequest & WithInferenceConfig(InferenceConfiguration &&value)
void SetAdditionalModelRequestFields(const Aws::Utils::Document &value)
void SetToolConfig(ToolConfiguration &&value)
void SetMessages(const Aws::Vector< Message > &value)
ConverseRequest & WithToolConfig(const ToolConfiguration &value)
ConverseRequest & WithSystem(Aws::Vector< SystemContentBlock > &&value)
ConverseRequest & WithAdditionalModelResponseFieldPaths(const Aws::Vector< Aws::String > &value)
void SetAdditionalModelResponseFieldPaths(const Aws::Vector< Aws::String > &value)
ConverseRequest & WithMessages(const Aws::Vector< Message > &value)
Aws::Utils::DocumentView GetAdditionalModelRequestFields() const
virtual const char * GetServiceRequestName() const override
ConverseRequest & WithSystem(const Aws::Vector< SystemContentBlock > &value)
const InferenceConfiguration & GetInferenceConfig() const
void SetGuardrailConfig(const GuardrailConfiguration &value)
ConverseRequest & AddMessages(Message &&value)
ConverseRequest & AddSystem(const SystemContentBlock &value)
ConverseRequest & WithInferenceConfig(const InferenceConfiguration &value)
const GuardrailConfiguration & GetGuardrailConfig() const
void SetGuardrailConfig(GuardrailConfiguration &&value)
void SetAdditionalModelRequestFields(Aws::Utils::Document &&value)
ConverseRequest & WithToolConfig(ToolConfiguration &&value)
ConverseRequest & WithModelId(const Aws::String &value)
void SetInferenceConfig(InferenceConfiguration &&value)
ConverseRequest & WithAdditionalModelRequestFields(const Aws::Utils::Document &value)
const Aws::Vector< SystemContentBlock > & GetSystem() const
void SetSystem(Aws::Vector< SystemContentBlock > &&value)
ConverseRequest & AddSystem(SystemContentBlock &&value)
ConverseRequest & WithGuardrailConfig(const GuardrailConfiguration &value)
ConverseRequest & AddAdditionalModelResponseFieldPaths(Aws::String &&value)
ConverseRequest & WithAdditionalModelRequestFields(Aws::Utils::Document &&value)
void SetModelId(const Aws::String &value)
void SetToolConfig(const ToolConfiguration &value)
ConverseRequest & WithMessages(Aws::Vector< Message > &&value)
ConverseRequest & WithModelId(const char *value)
ConverseRequest & WithAdditionalModelResponseFieldPaths(Aws::Vector< Aws::String > &&value)
void SetMessages(Aws::Vector< Message > &&value)
ConverseRequest & AddMessages(const Message &value)
const ToolConfiguration & GetToolConfig() const
void SetAdditionalModelResponseFieldPaths(Aws::Vector< Aws::String > &&value)
AWS_BEDROCKRUNTIME_API Aws::String SerializePayload() const override
ConverseRequest & AddAdditionalModelResponseFieldPaths(const Aws::String &value)
const Aws::Vector< Message > & GetMessages() const
void SetSystem(const Aws::Vector< SystemContentBlock > &value)
void SetInferenceConfig(const InferenceConfiguration &value)
ConverseRequest & WithGuardrailConfig(GuardrailConfiguration &&value)
AWS_BEDROCKRUNTIME_API ConverseRequest()
ConverseRequest & AddAdditionalModelResponseFieldPaths(const char *value)
ConverseRequest & WithModelId(Aws::String &&value)
const Aws::Vector< Aws::String > & GetAdditionalModelResponseFieldPaths() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector