AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
DocumentSource.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/DocumentContentBlock.h>
9#include <aws/bedrock-runtime/model/S3Location.h>
10#include <aws/core/utils/Array.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace BedrockRuntime {
24namespace Model {
25
32 public:
33 AWS_BEDROCKRUNTIME_API DocumentSource() = default;
36 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline const Aws::Utils::ByteBuffer& GetBytes() const { return m_bytes; }
44 inline bool BytesHasBeenSet() const { return m_bytesHasBeenSet; }
45 template <typename BytesT = Aws::Utils::ByteBuffer>
46 void SetBytes(BytesT&& value) {
47 m_bytesHasBeenSet = true;
48 m_bytes = std::forward<BytesT>(value);
49 }
50 template <typename BytesT = Aws::Utils::ByteBuffer>
52 SetBytes(std::forward<BytesT>(value));
53 return *this;
54 }
56
58
64 inline const S3Location& GetS3Location() const { return m_s3Location; }
65 inline bool S3LocationHasBeenSet() const { return m_s3LocationHasBeenSet; }
66 template <typename S3LocationT = S3Location>
67 void SetS3Location(S3LocationT&& value) {
68 m_s3LocationHasBeenSet = true;
69 m_s3Location = std::forward<S3LocationT>(value);
70 }
71 template <typename S3LocationT = S3Location>
73 SetS3Location(std::forward<S3LocationT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetText() const { return m_text; }
83 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
84 template <typename TextT = Aws::String>
85 void SetText(TextT&& value) {
86 m_textHasBeenSet = true;
87 m_text = std::forward<TextT>(value);
88 }
89 template <typename TextT = Aws::String>
91 SetText(std::forward<TextT>(value));
92 return *this;
93 }
95
97
101 inline const Aws::Vector<DocumentContentBlock>& GetContent() const { return m_content; }
102 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
103 template <typename ContentT = Aws::Vector<DocumentContentBlock>>
104 void SetContent(ContentT&& value) {
105 m_contentHasBeenSet = true;
106 m_content = std::forward<ContentT>(value);
107 }
108 template <typename ContentT = Aws::Vector<DocumentContentBlock>>
110 SetContent(std::forward<ContentT>(value));
111 return *this;
112 }
113 template <typename ContentT = DocumentContentBlock>
115 m_contentHasBeenSet = true;
116 m_content.emplace_back(std::forward<ContentT>(value));
117 return *this;
118 }
120 private:
121 Aws::Utils::ByteBuffer m_bytes{};
122
123 S3Location m_s3Location;
124
125 Aws::String m_text;
126
128 bool m_bytesHasBeenSet = false;
129 bool m_s3LocationHasBeenSet = false;
130 bool m_textHasBeenSet = false;
131 bool m_contentHasBeenSet = false;
132};
133
134} // namespace Model
135} // namespace BedrockRuntime
136} // namespace Aws
const S3Location & GetS3Location() const
AWS_BEDROCKRUNTIME_API DocumentSource()=default
DocumentSource & WithContent(ContentT &&value)
AWS_BEDROCKRUNTIME_API DocumentSource & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKRUNTIME_API DocumentSource(Aws::Utils::Json::JsonView jsonValue)
DocumentSource & AddContent(ContentT &&value)
DocumentSource & WithText(TextT &&value)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
DocumentSource & WithS3Location(S3LocationT &&value)
const Aws::Utils::ByteBuffer & GetBytes() const
const Aws::Vector< DocumentContentBlock > & GetContent() const
DocumentSource & WithBytes(BytesT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue