AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
ContentBlock.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/AudioBlock.h>
9#include <aws/bedrock-runtime/model/CachePointBlock.h>
10#include <aws/bedrock-runtime/model/CitationsContentBlock.h>
11#include <aws/bedrock-runtime/model/DocumentBlock.h>
12#include <aws/bedrock-runtime/model/GuardrailConverseContentBlock.h>
13#include <aws/bedrock-runtime/model/ImageBlock.h>
14#include <aws/bedrock-runtime/model/ReasoningContentBlock.h>
15#include <aws/bedrock-runtime/model/SearchResultBlock.h>
16#include <aws/bedrock-runtime/model/ToolAdditionBlock.h>
17#include <aws/bedrock-runtime/model/ToolRemovalBlock.h>
18#include <aws/bedrock-runtime/model/ToolResultBlock.h>
19#include <aws/bedrock-runtime/model/ToolUseBlock.h>
20#include <aws/bedrock-runtime/model/VideoBlock.h>
21#include <aws/core/utils/memory/stl/AWSString.h>
22
23#include <utility>
24
25namespace Aws {
26namespace Utils {
27namespace Json {
28class JsonValue;
29class JsonView;
30} // namespace Json
31} // namespace Utils
32namespace BedrockRuntime {
33namespace Model {
34
46 public:
47 AWS_BEDROCKRUNTIME_API ContentBlock() = default;
48 AWS_BEDROCKRUNTIME_API ContentBlock(Aws::Utils::Json::JsonView jsonValue);
49 AWS_BEDROCKRUNTIME_API ContentBlock& operator=(Aws::Utils::Json::JsonView jsonValue);
50 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
51
53
56 inline const Aws::String& GetText() const { return m_text; }
57 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
58 template <typename TextT = Aws::String>
59 void SetText(TextT&& value) {
60 m_textHasBeenSet = true;
61 m_text = std::forward<TextT>(value);
62 }
63 template <typename TextT = Aws::String>
64 ContentBlock& WithText(TextT&& value) {
65 SetText(std::forward<TextT>(value));
66 return *this;
67 }
69
71
75 inline const ImageBlock& GetImage() const { return m_image; }
76 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
77 template <typename ImageT = ImageBlock>
78 void SetImage(ImageT&& value) {
79 m_imageHasBeenSet = true;
80 m_image = std::forward<ImageT>(value);
81 }
82 template <typename ImageT = ImageBlock>
83 ContentBlock& WithImage(ImageT&& value) {
84 SetImage(std::forward<ImageT>(value));
85 return *this;
86 }
88
90
93 inline const DocumentBlock& GetDocument() const { return m_document; }
94 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
95 template <typename DocumentT = DocumentBlock>
96 void SetDocument(DocumentT&& value) {
97 m_documentHasBeenSet = true;
98 m_document = std::forward<DocumentT>(value);
99 }
100 template <typename DocumentT = DocumentBlock>
101 ContentBlock& WithDocument(DocumentT&& value) {
102 SetDocument(std::forward<DocumentT>(value));
103 return *this;
104 }
106
108
111 inline const VideoBlock& GetVideo() const { return m_video; }
112 inline bool VideoHasBeenSet() const { return m_videoHasBeenSet; }
113 template <typename VideoT = VideoBlock>
114 void SetVideo(VideoT&& value) {
115 m_videoHasBeenSet = true;
116 m_video = std::forward<VideoT>(value);
117 }
118 template <typename VideoT = VideoBlock>
119 ContentBlock& WithVideo(VideoT&& value) {
120 SetVideo(std::forward<VideoT>(value));
121 return *this;
122 }
124
126
129 inline const AudioBlock& GetAudio() const { return m_audio; }
130 inline bool AudioHasBeenSet() const { return m_audioHasBeenSet; }
131 template <typename AudioT = AudioBlock>
132 void SetAudio(AudioT&& value) {
133 m_audioHasBeenSet = true;
134 m_audio = std::forward<AudioT>(value);
135 }
136 template <typename AudioT = AudioBlock>
137 ContentBlock& WithAudio(AudioT&& value) {
138 SetAudio(std::forward<AudioT>(value));
139 return *this;
140 }
142
144
147 inline const ToolUseBlock& GetToolUse() const { return m_toolUse; }
148 inline bool ToolUseHasBeenSet() const { return m_toolUseHasBeenSet; }
149 template <typename ToolUseT = ToolUseBlock>
150 void SetToolUse(ToolUseT&& value) {
151 m_toolUseHasBeenSet = true;
152 m_toolUse = std::forward<ToolUseT>(value);
153 }
154 template <typename ToolUseT = ToolUseBlock>
155 ContentBlock& WithToolUse(ToolUseT&& value) {
156 SetToolUse(std::forward<ToolUseT>(value));
157 return *this;
158 }
160
162
165 inline const ToolResultBlock& GetToolResult() const { return m_toolResult; }
166 inline bool ToolResultHasBeenSet() const { return m_toolResultHasBeenSet; }
167 template <typename ToolResultT = ToolResultBlock>
168 void SetToolResult(ToolResultT&& value) {
169 m_toolResultHasBeenSet = true;
170 m_toolResult = std::forward<ToolResultT>(value);
171 }
172 template <typename ToolResultT = ToolResultBlock>
173 ContentBlock& WithToolResult(ToolResultT&& value) {
174 SetToolResult(std::forward<ToolResultT>(value));
175 return *this;
176 }
178
180
187 inline const GuardrailConverseContentBlock& GetGuardContent() const { return m_guardContent; }
188 inline bool GuardContentHasBeenSet() const { return m_guardContentHasBeenSet; }
189 template <typename GuardContentT = GuardrailConverseContentBlock>
190 void SetGuardContent(GuardContentT&& value) {
191 m_guardContentHasBeenSet = true;
192 m_guardContent = std::forward<GuardContentT>(value);
193 }
194 template <typename GuardContentT = GuardrailConverseContentBlock>
195 ContentBlock& WithGuardContent(GuardContentT&& value) {
196 SetGuardContent(std::forward<GuardContentT>(value));
197 return *this;
198 }
200
202
205 inline const CachePointBlock& GetCachePoint() const { return m_cachePoint; }
206 inline bool CachePointHasBeenSet() const { return m_cachePointHasBeenSet; }
207 template <typename CachePointT = CachePointBlock>
208 void SetCachePoint(CachePointT&& value) {
209 m_cachePointHasBeenSet = true;
210 m_cachePoint = std::forward<CachePointT>(value);
211 }
212 template <typename CachePointT = CachePointBlock>
213 ContentBlock& WithCachePoint(CachePointT&& value) {
214 SetCachePoint(std::forward<CachePointT>(value));
215 return *this;
216 }
218
220
225 inline const ReasoningContentBlock& GetReasoningContent() const { return m_reasoningContent; }
226 inline bool ReasoningContentHasBeenSet() const { return m_reasoningContentHasBeenSet; }
227 template <typename ReasoningContentT = ReasoningContentBlock>
228 void SetReasoningContent(ReasoningContentT&& value) {
229 m_reasoningContentHasBeenSet = true;
230 m_reasoningContent = std::forward<ReasoningContentT>(value);
231 }
232 template <typename ReasoningContentT = ReasoningContentBlock>
233 ContentBlock& WithReasoningContent(ReasoningContentT&& value) {
234 SetReasoningContent(std::forward<ReasoningContentT>(value));
235 return *this;
236 }
238
240
245 inline const CitationsContentBlock& GetCitationsContent() const { return m_citationsContent; }
246 inline bool CitationsContentHasBeenSet() const { return m_citationsContentHasBeenSet; }
247 template <typename CitationsContentT = CitationsContentBlock>
248 void SetCitationsContent(CitationsContentT&& value) {
249 m_citationsContentHasBeenSet = true;
250 m_citationsContent = std::forward<CitationsContentT>(value);
251 }
252 template <typename CitationsContentT = CitationsContentBlock>
253 ContentBlock& WithCitationsContent(CitationsContentT&& value) {
254 SetCitationsContent(std::forward<CitationsContentT>(value));
255 return *this;
256 }
258
260
263 inline const SearchResultBlock& GetSearchResult() const { return m_searchResult; }
264 inline bool SearchResultHasBeenSet() const { return m_searchResultHasBeenSet; }
265 template <typename SearchResultT = SearchResultBlock>
266 void SetSearchResult(SearchResultT&& value) {
267 m_searchResultHasBeenSet = true;
268 m_searchResult = std::forward<SearchResultT>(value);
269 }
270 template <typename SearchResultT = SearchResultBlock>
271 ContentBlock& WithSearchResult(SearchResultT&& value) {
272 SetSearchResult(std::forward<SearchResultT>(value));
273 return *this;
274 }
276
278
279 inline const ToolAdditionBlock& GetToolAddition() const { return m_toolAddition; }
280 inline bool ToolAdditionHasBeenSet() const { return m_toolAdditionHasBeenSet; }
281 template <typename ToolAdditionT = ToolAdditionBlock>
282 void SetToolAddition(ToolAdditionT&& value) {
283 m_toolAdditionHasBeenSet = true;
284 m_toolAddition = std::forward<ToolAdditionT>(value);
285 }
286 template <typename ToolAdditionT = ToolAdditionBlock>
287 ContentBlock& WithToolAddition(ToolAdditionT&& value) {
288 SetToolAddition(std::forward<ToolAdditionT>(value));
289 return *this;
290 }
292
294
295 inline const ToolRemovalBlock& GetToolRemoval() const { return m_toolRemoval; }
296 inline bool ToolRemovalHasBeenSet() const { return m_toolRemovalHasBeenSet; }
297 template <typename ToolRemovalT = ToolRemovalBlock>
298 void SetToolRemoval(ToolRemovalT&& value) {
299 m_toolRemovalHasBeenSet = true;
300 m_toolRemoval = std::forward<ToolRemovalT>(value);
301 }
302 template <typename ToolRemovalT = ToolRemovalBlock>
303 ContentBlock& WithToolRemoval(ToolRemovalT&& value) {
304 SetToolRemoval(std::forward<ToolRemovalT>(value));
305 return *this;
306 }
308 private:
309 Aws::String m_text;
310
311 ImageBlock m_image;
312
313 DocumentBlock m_document;
314
315 VideoBlock m_video;
316
317 AudioBlock m_audio;
318
319 ToolUseBlock m_toolUse;
320
321 ToolResultBlock m_toolResult;
322
323 GuardrailConverseContentBlock m_guardContent;
324
325 CachePointBlock m_cachePoint;
326
327 ReasoningContentBlock m_reasoningContent;
328
329 CitationsContentBlock m_citationsContent;
330
331 SearchResultBlock m_searchResult;
332
333 ToolAdditionBlock m_toolAddition;
334
335 ToolRemovalBlock m_toolRemoval;
336 bool m_textHasBeenSet = false;
337 bool m_imageHasBeenSet = false;
338 bool m_documentHasBeenSet = false;
339 bool m_videoHasBeenSet = false;
340 bool m_audioHasBeenSet = false;
341 bool m_toolUseHasBeenSet = false;
342 bool m_toolResultHasBeenSet = false;
343 bool m_guardContentHasBeenSet = false;
344 bool m_cachePointHasBeenSet = false;
345 bool m_reasoningContentHasBeenSet = false;
346 bool m_citationsContentHasBeenSet = false;
347 bool m_searchResultHasBeenSet = false;
348 bool m_toolAdditionHasBeenSet = false;
349 bool m_toolRemovalHasBeenSet = false;
350};
351
352} // namespace Model
353} // namespace BedrockRuntime
354} // namespace Aws
ContentBlock & WithAudio(AudioT &&value)
const AudioBlock & GetAudio() const
const CitationsContentBlock & GetCitationsContent() const
ContentBlock & WithText(TextT &&value)
const CachePointBlock & GetCachePoint() const
ContentBlock & WithSearchResult(SearchResultT &&value)
void SetSearchResult(SearchResultT &&value)
const GuardrailConverseContentBlock & GetGuardContent() const
const Aws::String & GetText() const
ContentBlock & WithToolRemoval(ToolRemovalT &&value)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const ToolUseBlock & GetToolUse() const
void SetCachePoint(CachePointT &&value)
AWS_BEDROCKRUNTIME_API ContentBlock & operator=(Aws::Utils::Json::JsonView jsonValue)
const SearchResultBlock & GetSearchResult() const
void SetToolAddition(ToolAdditionT &&value)
ContentBlock & WithGuardContent(GuardContentT &&value)
void SetReasoningContent(ReasoningContentT &&value)
void SetToolRemoval(ToolRemovalT &&value)
AWS_BEDROCKRUNTIME_API ContentBlock(Aws::Utils::Json::JsonView jsonValue)
void SetToolResult(ToolResultT &&value)
const ReasoningContentBlock & GetReasoningContent() const
ContentBlock & WithCachePoint(CachePointT &&value)
ContentBlock & WithImage(ImageT &&value)
void SetGuardContent(GuardContentT &&value)
const ToolRemovalBlock & GetToolRemoval() const
ContentBlock & WithVideo(VideoT &&value)
const VideoBlock & GetVideo() const
ContentBlock & WithReasoningContent(ReasoningContentT &&value)
void SetCitationsContent(CitationsContentT &&value)
ContentBlock & WithDocument(DocumentT &&value)
const DocumentBlock & GetDocument() const
ContentBlock & WithToolUse(ToolUseT &&value)
ContentBlock & WithToolAddition(ToolAdditionT &&value)
const ImageBlock & GetImage() const
const ToolAdditionBlock & GetToolAddition() const
ContentBlock & WithCitationsContent(CitationsContentT &&value)
AWS_BEDROCKRUNTIME_API ContentBlock()=default
ContentBlock & WithToolResult(ToolResultT &&value)
const ToolResultBlock & GetToolResult() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue