AWS SDK for C++

AWS SDK for C++ Version 1.11.744

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/ToolResultBlock.h>
17#include <aws/bedrock-runtime/model/ToolUseBlock.h>
18#include <aws/bedrock-runtime/model/VideoBlock.h>
19#include <aws/core/utils/memory/stl/AWSString.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace BedrockRuntime {
31namespace Model {
32
44 public:
45 AWS_BEDROCKRUNTIME_API ContentBlock() = default;
48 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
49
51
54 inline const Aws::String& GetText() const { return m_text; }
55 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
56 template <typename TextT = Aws::String>
57 void SetText(TextT&& value) {
58 m_textHasBeenSet = true;
59 m_text = std::forward<TextT>(value);
60 }
61 template <typename TextT = Aws::String>
63 SetText(std::forward<TextT>(value));
64 return *this;
65 }
67
69
73 inline const ImageBlock& GetImage() const { return m_image; }
74 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
75 template <typename ImageT = ImageBlock>
76 void SetImage(ImageT&& value) {
77 m_imageHasBeenSet = true;
78 m_image = std::forward<ImageT>(value);
79 }
80 template <typename ImageT = ImageBlock>
82 SetImage(std::forward<ImageT>(value));
83 return *this;
84 }
86
88
91 inline const DocumentBlock& GetDocument() const { return m_document; }
92 inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; }
93 template <typename DocumentT = DocumentBlock>
94 void SetDocument(DocumentT&& value) {
95 m_documentHasBeenSet = true;
96 m_document = std::forward<DocumentT>(value);
97 }
98 template <typename DocumentT = DocumentBlock>
100 SetDocument(std::forward<DocumentT>(value));
101 return *this;
102 }
104
106
109 inline const VideoBlock& GetVideo() const { return m_video; }
110 inline bool VideoHasBeenSet() const { return m_videoHasBeenSet; }
111 template <typename VideoT = VideoBlock>
112 void SetVideo(VideoT&& value) {
113 m_videoHasBeenSet = true;
114 m_video = std::forward<VideoT>(value);
115 }
116 template <typename VideoT = VideoBlock>
118 SetVideo(std::forward<VideoT>(value));
119 return *this;
120 }
122
124
127 inline const AudioBlock& GetAudio() const { return m_audio; }
128 inline bool AudioHasBeenSet() const { return m_audioHasBeenSet; }
129 template <typename AudioT = AudioBlock>
130 void SetAudio(AudioT&& value) {
131 m_audioHasBeenSet = true;
132 m_audio = std::forward<AudioT>(value);
133 }
134 template <typename AudioT = AudioBlock>
136 SetAudio(std::forward<AudioT>(value));
137 return *this;
138 }
140
142
145 inline const ToolUseBlock& GetToolUse() const { return m_toolUse; }
146 inline bool ToolUseHasBeenSet() const { return m_toolUseHasBeenSet; }
147 template <typename ToolUseT = ToolUseBlock>
148 void SetToolUse(ToolUseT&& value) {
149 m_toolUseHasBeenSet = true;
150 m_toolUse = std::forward<ToolUseT>(value);
151 }
152 template <typename ToolUseT = ToolUseBlock>
154 SetToolUse(std::forward<ToolUseT>(value));
155 return *this;
156 }
158
160
163 inline const ToolResultBlock& GetToolResult() const { return m_toolResult; }
164 inline bool ToolResultHasBeenSet() const { return m_toolResultHasBeenSet; }
165 template <typename ToolResultT = ToolResultBlock>
167 m_toolResultHasBeenSet = true;
168 m_toolResult = std::forward<ToolResultT>(value);
169 }
170 template <typename ToolResultT = ToolResultBlock>
172 SetToolResult(std::forward<ToolResultT>(value));
173 return *this;
174 }
176
178
185 inline const GuardrailConverseContentBlock& GetGuardContent() const { return m_guardContent; }
186 inline bool GuardContentHasBeenSet() const { return m_guardContentHasBeenSet; }
187 template <typename GuardContentT = GuardrailConverseContentBlock>
189 m_guardContentHasBeenSet = true;
190 m_guardContent = std::forward<GuardContentT>(value);
191 }
192 template <typename GuardContentT = GuardrailConverseContentBlock>
194 SetGuardContent(std::forward<GuardContentT>(value));
195 return *this;
196 }
198
200
203 inline const CachePointBlock& GetCachePoint() const { return m_cachePoint; }
204 inline bool CachePointHasBeenSet() const { return m_cachePointHasBeenSet; }
205 template <typename CachePointT = CachePointBlock>
207 m_cachePointHasBeenSet = true;
208 m_cachePoint = std::forward<CachePointT>(value);
209 }
210 template <typename CachePointT = CachePointBlock>
212 SetCachePoint(std::forward<CachePointT>(value));
213 return *this;
214 }
216
218
223 inline const ReasoningContentBlock& GetReasoningContent() const { return m_reasoningContent; }
224 inline bool ReasoningContentHasBeenSet() const { return m_reasoningContentHasBeenSet; }
225 template <typename ReasoningContentT = ReasoningContentBlock>
227 m_reasoningContentHasBeenSet = true;
228 m_reasoningContent = std::forward<ReasoningContentT>(value);
229 }
230 template <typename ReasoningContentT = ReasoningContentBlock>
232 SetReasoningContent(std::forward<ReasoningContentT>(value));
233 return *this;
234 }
236
238
243 inline const CitationsContentBlock& GetCitationsContent() const { return m_citationsContent; }
244 inline bool CitationsContentHasBeenSet() const { return m_citationsContentHasBeenSet; }
245 template <typename CitationsContentT = CitationsContentBlock>
247 m_citationsContentHasBeenSet = true;
248 m_citationsContent = std::forward<CitationsContentT>(value);
249 }
250 template <typename CitationsContentT = CitationsContentBlock>
252 SetCitationsContent(std::forward<CitationsContentT>(value));
253 return *this;
254 }
256
258
261 inline const SearchResultBlock& GetSearchResult() const { return m_searchResult; }
262 inline bool SearchResultHasBeenSet() const { return m_searchResultHasBeenSet; }
263 template <typename SearchResultT = SearchResultBlock>
265 m_searchResultHasBeenSet = true;
266 m_searchResult = std::forward<SearchResultT>(value);
267 }
268 template <typename SearchResultT = SearchResultBlock>
270 SetSearchResult(std::forward<SearchResultT>(value));
271 return *this;
272 }
274 private:
275 Aws::String m_text;
276
277 ImageBlock m_image;
278
279 DocumentBlock m_document;
280
281 VideoBlock m_video;
282
283 AudioBlock m_audio;
284
285 ToolUseBlock m_toolUse;
286
287 ToolResultBlock m_toolResult;
288
289 GuardrailConverseContentBlock m_guardContent;
290
291 CachePointBlock m_cachePoint;
292
293 ReasoningContentBlock m_reasoningContent;
294
295 CitationsContentBlock m_citationsContent;
296
297 SearchResultBlock m_searchResult;
298 bool m_textHasBeenSet = false;
299 bool m_imageHasBeenSet = false;
300 bool m_documentHasBeenSet = false;
301 bool m_videoHasBeenSet = false;
302 bool m_audioHasBeenSet = false;
303 bool m_toolUseHasBeenSet = false;
304 bool m_toolResultHasBeenSet = false;
305 bool m_guardContentHasBeenSet = false;
306 bool m_cachePointHasBeenSet = false;
307 bool m_reasoningContentHasBeenSet = false;
308 bool m_citationsContentHasBeenSet = false;
309 bool m_searchResultHasBeenSet = false;
310};
311
312} // namespace Model
313} // namespace BedrockRuntime
314} // 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
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
ContentBlock & WithGuardContent(GuardContentT &&value)
void SetReasoningContent(ReasoningContentT &&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)
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)
const ImageBlock & GetImage() const
ContentBlock & WithCitationsContent(CitationsContentT &&value)
AWS_BEDROCKRUNTIME_API ContentBlock()=default
ContentBlock & WithToolResult(ToolResultT &&value)
const ToolResultBlock & GetToolResult() const
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue