AWS SDK for C++

AWS SDK for C++ Version 1.11.934

Loading...
Searching...
No Matches
ContentBlock.h
1
6#pragma once
7#include <aws/bedrock-agentcore/BedrockAgentCore_EXPORTS.h>
8#include <aws/bedrock-agentcore/model/ContentBlockType.h>
9#include <aws/bedrock-agentcore/model/ResourceContent.h>
10#include <aws/core/utils/Array.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace BedrockAgentCore {
23namespace Model {
24
31 public:
32 AWS_BEDROCKAGENTCORE_API ContentBlock() = default;
33 AWS_BEDROCKAGENTCORE_API ContentBlock(Aws::Utils::Json::JsonView jsonValue);
34 AWS_BEDROCKAGENTCORE_API ContentBlock& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline ContentBlockType GetType() const { return m_type; }
42 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
43 inline void SetType(ContentBlockType value) {
44 m_typeHasBeenSet = true;
45 m_type = value;
46 }
48 SetType(value);
49 return *this;
50 }
52
54
57 inline const Aws::String& GetText() const { return m_text; }
58 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
59 template <typename TextT = Aws::String>
60 void SetText(TextT&& value) {
61 m_textHasBeenSet = true;
62 m_text = std::forward<TextT>(value);
63 }
64 template <typename TextT = Aws::String>
65 ContentBlock& WithText(TextT&& value) {
66 SetText(std::forward<TextT>(value));
67 return *this;
68 }
70
72
75 inline const Aws::Utils::ByteBuffer& GetData() const { return m_data; }
76 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
77 template <typename DataT = Aws::Utils::ByteBuffer>
78 void SetData(DataT&& value) {
79 m_dataHasBeenSet = true;
80 m_data = std::forward<DataT>(value);
81 }
82 template <typename DataT = Aws::Utils::ByteBuffer>
83 ContentBlock& WithData(DataT&& value) {
84 SetData(std::forward<DataT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetMimeType() const { return m_mimeType; }
94 inline bool MimeTypeHasBeenSet() const { return m_mimeTypeHasBeenSet; }
95 template <typename MimeTypeT = Aws::String>
96 void SetMimeType(MimeTypeT&& value) {
97 m_mimeTypeHasBeenSet = true;
98 m_mimeType = std::forward<MimeTypeT>(value);
99 }
100 template <typename MimeTypeT = Aws::String>
101 ContentBlock& WithMimeType(MimeTypeT&& value) {
102 SetMimeType(std::forward<MimeTypeT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::String& GetUri() const { return m_uri; }
112 inline bool UriHasBeenSet() const { return m_uriHasBeenSet; }
113 template <typename UriT = Aws::String>
114 void SetUri(UriT&& value) {
115 m_uriHasBeenSet = true;
116 m_uri = std::forward<UriT>(value);
117 }
118 template <typename UriT = Aws::String>
119 ContentBlock& WithUri(UriT&& value) {
120 SetUri(std::forward<UriT>(value));
121 return *this;
122 }
124
126
129 inline const Aws::String& GetName() const { return m_name; }
130 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
131 template <typename NameT = Aws::String>
132 void SetName(NameT&& value) {
133 m_nameHasBeenSet = true;
134 m_name = std::forward<NameT>(value);
135 }
136 template <typename NameT = Aws::String>
137 ContentBlock& WithName(NameT&& value) {
138 SetName(std::forward<NameT>(value));
139 return *this;
140 }
142
144
147 inline const Aws::String& GetDescription() const { return m_description; }
148 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
149 template <typename DescriptionT = Aws::String>
150 void SetDescription(DescriptionT&& value) {
151 m_descriptionHasBeenSet = true;
152 m_description = std::forward<DescriptionT>(value);
153 }
154 template <typename DescriptionT = Aws::String>
155 ContentBlock& WithDescription(DescriptionT&& value) {
156 SetDescription(std::forward<DescriptionT>(value));
157 return *this;
158 }
160
162
165 inline long long GetSize() const { return m_size; }
166 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
167 inline void SetSize(long long value) {
168 m_sizeHasBeenSet = true;
169 m_size = value;
170 }
171 inline ContentBlock& WithSize(long long value) {
172 SetSize(value);
173 return *this;
174 }
176
178
181 inline const ResourceContent& GetResource() const { return m_resource; }
182 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
183 template <typename ResourceT = ResourceContent>
184 void SetResource(ResourceT&& value) {
185 m_resourceHasBeenSet = true;
186 m_resource = std::forward<ResourceT>(value);
187 }
188 template <typename ResourceT = ResourceContent>
189 ContentBlock& WithResource(ResourceT&& value) {
190 SetResource(std::forward<ResourceT>(value));
191 return *this;
192 }
194 private:
196
197 Aws::String m_text;
198
199 Aws::Utils::ByteBuffer m_data{};
200
201 Aws::String m_mimeType;
202
203 Aws::String m_uri;
204
205 Aws::String m_name;
206
207 Aws::String m_description;
208
209 long long m_size{0};
210
211 ResourceContent m_resource;
212 bool m_typeHasBeenSet = false;
213 bool m_textHasBeenSet = false;
214 bool m_dataHasBeenSet = false;
215 bool m_mimeTypeHasBeenSet = false;
216 bool m_uriHasBeenSet = false;
217 bool m_nameHasBeenSet = false;
218 bool m_descriptionHasBeenSet = false;
219 bool m_sizeHasBeenSet = false;
220 bool m_resourceHasBeenSet = false;
221};
222
223} // namespace Model
224} // namespace BedrockAgentCore
225} // namespace Aws
AWS_BEDROCKAGENTCORE_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetMimeType() const
ContentBlock & WithText(TextT &&value)
ContentBlock & WithName(NameT &&value)
void SetDescription(DescriptionT &&value)
const Aws::String & GetName() const
void SetType(ContentBlockType value)
ContentBlock & WithData(DataT &&value)
AWS_BEDROCKAGENTCORE_API ContentBlock & operator=(Aws::Utils::Json::JsonView jsonValue)
ContentBlock & WithMimeType(MimeTypeT &&value)
ContentBlock & WithResource(ResourceT &&value)
AWS_BEDROCKAGENTCORE_API ContentBlock()=default
ContentBlock & WithUri(UriT &&value)
const Aws::String & GetText() const
ContentBlock & WithDescription(DescriptionT &&value)
ContentBlock & WithType(ContentBlockType value)
const ResourceContent & GetResource() const
AWS_BEDROCKAGENTCORE_API ContentBlock(Aws::Utils::Json::JsonView jsonValue)
ContentBlock & WithSize(long long value)
const Aws::Utils::ByteBuffer & GetData() const
const Aws::String & GetDescription() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue