AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Document.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kendra/Kendra_EXPORTS.h>
11#include <aws/kendra/model/ContentType.h>
12#include <aws/kendra/model/DocumentAttribute.h>
13#include <aws/kendra/model/HierarchicalPrincipal.h>
14#include <aws/kendra/model/Principal.h>
15#include <aws/kendra/model/S3Path.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace kendra {
27namespace Model {
28
34class Document {
35 public:
36 AWS_KENDRA_API Document() = default;
37 AWS_KENDRA_API Document(Aws::Utils::Json::JsonView jsonValue);
38 AWS_KENDRA_API Document& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
50 inline const Aws::String& GetId() const { return m_id; }
51 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
52 template <typename IdT = Aws::String>
53 void SetId(IdT&& value) {
54 m_idHasBeenSet = true;
55 m_id = std::forward<IdT>(value);
56 }
57 template <typename IdT = Aws::String>
58 Document& WithId(IdT&& value) {
59 SetId(std::forward<IdT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetTitle() const { return m_title; }
69 inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; }
70 template <typename TitleT = Aws::String>
71 void SetTitle(TitleT&& value) {
72 m_titleHasBeenSet = true;
73 m_title = std::forward<TitleT>(value);
74 }
75 template <typename TitleT = Aws::String>
76 Document& WithTitle(TitleT&& value) {
77 SetTitle(std::forward<TitleT>(value));
78 return *this;
79 }
81
83
90 inline const Aws::Utils::ByteBuffer& GetBlob() const { return m_blob; }
91 inline bool BlobHasBeenSet() const { return m_blobHasBeenSet; }
92 template <typename BlobT = Aws::Utils::ByteBuffer>
93 void SetBlob(BlobT&& value) {
94 m_blobHasBeenSet = true;
95 m_blob = std::forward<BlobT>(value);
96 }
97 template <typename BlobT = Aws::Utils::ByteBuffer>
98 Document& WithBlob(BlobT&& value) {
99 SetBlob(std::forward<BlobT>(value));
100 return *this;
101 }
103
105
106 inline const S3Path& GetS3Path() const { return m_s3Path; }
107 inline bool S3PathHasBeenSet() const { return m_s3PathHasBeenSet; }
108 template <typename S3PathT = S3Path>
109 void SetS3Path(S3PathT&& value) {
110 m_s3PathHasBeenSet = true;
111 m_s3Path = std::forward<S3PathT>(value);
112 }
113 template <typename S3PathT = S3Path>
114 Document& WithS3Path(S3PathT&& value) {
115 SetS3Path(std::forward<S3PathT>(value));
116 return *this;
117 }
119
121
130 inline const Aws::Vector<DocumentAttribute>& GetAttributes() const { return m_attributes; }
131 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
132 template <typename AttributesT = Aws::Vector<DocumentAttribute>>
133 void SetAttributes(AttributesT&& value) {
134 m_attributesHasBeenSet = true;
135 m_attributes = std::forward<AttributesT>(value);
136 }
137 template <typename AttributesT = Aws::Vector<DocumentAttribute>>
138 Document& WithAttributes(AttributesT&& value) {
139 SetAttributes(std::forward<AttributesT>(value));
140 return *this;
141 }
142 template <typename AttributesT = DocumentAttribute>
143 Document& AddAttributes(AttributesT&& value) {
144 m_attributesHasBeenSet = true;
145 m_attributes.emplace_back(std::forward<AttributesT>(value));
146 return *this;
147 }
149
151
156 inline const Aws::Vector<Principal>& GetAccessControlList() const { return m_accessControlList; }
157 inline bool AccessControlListHasBeenSet() const { return m_accessControlListHasBeenSet; }
158 template <typename AccessControlListT = Aws::Vector<Principal>>
159 void SetAccessControlList(AccessControlListT&& value) {
160 m_accessControlListHasBeenSet = true;
161 m_accessControlList = std::forward<AccessControlListT>(value);
162 }
163 template <typename AccessControlListT = Aws::Vector<Principal>>
164 Document& WithAccessControlList(AccessControlListT&& value) {
165 SetAccessControlList(std::forward<AccessControlListT>(value));
166 return *this;
167 }
168 template <typename AccessControlListT = Principal>
169 Document& AddAccessControlList(AccessControlListT&& value) {
170 m_accessControlListHasBeenSet = true;
171 m_accessControlList.emplace_back(std::forward<AccessControlListT>(value));
172 return *this;
173 }
175
177
183 inline const Aws::Vector<HierarchicalPrincipal>& GetHierarchicalAccessControlList() const { return m_hierarchicalAccessControlList; }
184 inline bool HierarchicalAccessControlListHasBeenSet() const { return m_hierarchicalAccessControlListHasBeenSet; }
185 template <typename HierarchicalAccessControlListT = Aws::Vector<HierarchicalPrincipal>>
186 void SetHierarchicalAccessControlList(HierarchicalAccessControlListT&& value) {
187 m_hierarchicalAccessControlListHasBeenSet = true;
188 m_hierarchicalAccessControlList = std::forward<HierarchicalAccessControlListT>(value);
189 }
190 template <typename HierarchicalAccessControlListT = Aws::Vector<HierarchicalPrincipal>>
191 Document& WithHierarchicalAccessControlList(HierarchicalAccessControlListT&& value) {
192 SetHierarchicalAccessControlList(std::forward<HierarchicalAccessControlListT>(value));
193 return *this;
194 }
195 template <typename HierarchicalAccessControlListT = HierarchicalPrincipal>
196 Document& AddHierarchicalAccessControlList(HierarchicalAccessControlListT&& value) {
197 m_hierarchicalAccessControlListHasBeenSet = true;
198 m_hierarchicalAccessControlList.emplace_back(std::forward<HierarchicalAccessControlListT>(value));
199 return *this;
200 }
202
204
210 inline ContentType GetContentType() const { return m_contentType; }
211 inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; }
212 inline void SetContentType(ContentType value) {
213 m_contentTypeHasBeenSet = true;
214 m_contentType = value;
215 }
217 SetContentType(value);
218 return *this;
219 }
221
223
227 inline const Aws::String& GetAccessControlConfigurationId() const { return m_accessControlConfigurationId; }
228 inline bool AccessControlConfigurationIdHasBeenSet() const { return m_accessControlConfigurationIdHasBeenSet; }
229 template <typename AccessControlConfigurationIdT = Aws::String>
230 void SetAccessControlConfigurationId(AccessControlConfigurationIdT&& value) {
231 m_accessControlConfigurationIdHasBeenSet = true;
232 m_accessControlConfigurationId = std::forward<AccessControlConfigurationIdT>(value);
233 }
234 template <typename AccessControlConfigurationIdT = Aws::String>
235 Document& WithAccessControlConfigurationId(AccessControlConfigurationIdT&& value) {
236 SetAccessControlConfigurationId(std::forward<AccessControlConfigurationIdT>(value));
237 return *this;
238 }
240 private:
241 Aws::String m_id;
242
243 Aws::String m_title;
244
245 Aws::Utils::ByteBuffer m_blob{};
246
247 S3Path m_s3Path;
248
250
251 Aws::Vector<Principal> m_accessControlList;
252
253 Aws::Vector<HierarchicalPrincipal> m_hierarchicalAccessControlList;
254
255 ContentType m_contentType{ContentType::NOT_SET};
256
257 Aws::String m_accessControlConfigurationId;
258 bool m_idHasBeenSet = false;
259 bool m_titleHasBeenSet = false;
260 bool m_blobHasBeenSet = false;
261 bool m_s3PathHasBeenSet = false;
262 bool m_attributesHasBeenSet = false;
263 bool m_accessControlListHasBeenSet = false;
264 bool m_hierarchicalAccessControlListHasBeenSet = false;
265 bool m_contentTypeHasBeenSet = false;
266 bool m_accessControlConfigurationIdHasBeenSet = false;
267};
268
269} // namespace Model
270} // namespace kendra
271} // namespace Aws
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
bool TitleHasBeenSet() const
Definition Document.h:69
Document & WithId(IdT &&value)
Definition Document.h:58
bool BlobHasBeenSet() const
Definition Document.h:91
void SetId(IdT &&value)
Definition Document.h:53
Document & WithAttributes(AttributesT &&value)
Definition Document.h:138
void SetAccessControlList(AccessControlListT &&value)
Definition Document.h:159
Document & AddAccessControlList(AccessControlListT &&value)
Definition Document.h:169
void SetAttributes(AttributesT &&value)
Definition Document.h:133
Document & WithBlob(BlobT &&value)
Definition Document.h:98
bool S3PathHasBeenSet() const
Definition Document.h:107
Document & WithS3Path(S3PathT &&value)
Definition Document.h:114
Document & AddHierarchicalAccessControlList(HierarchicalAccessControlListT &&value)
Definition Document.h:196
Document & WithContentType(ContentType value)
Definition Document.h:216
const Aws::String & GetTitle() const
Definition Document.h:68
const Aws::String & GetAccessControlConfigurationId() const
Definition Document.h:227
ContentType GetContentType() const
Definition Document.h:210
bool AccessControlConfigurationIdHasBeenSet() const
Definition Document.h:228
const Aws::Vector< DocumentAttribute > & GetAttributes() const
Definition Document.h:130
void SetBlob(BlobT &&value)
Definition Document.h:93
Document & WithAccessControlConfigurationId(AccessControlConfigurationIdT &&value)
Definition Document.h:235
bool ContentTypeHasBeenSet() const
Definition Document.h:211
bool HierarchicalAccessControlListHasBeenSet() const
Definition Document.h:184
void SetHierarchicalAccessControlList(HierarchicalAccessControlListT &&value)
Definition Document.h:186
bool AttributesHasBeenSet() const
Definition Document.h:131
void SetAccessControlConfigurationId(AccessControlConfigurationIdT &&value)
Definition Document.h:230
Document & WithAccessControlList(AccessControlListT &&value)
Definition Document.h:164
Document & AddAttributes(AttributesT &&value)
Definition Document.h:143
void SetS3Path(S3PathT &&value)
Definition Document.h:109
const Aws::Vector< Principal > & GetAccessControlList() const
Definition Document.h:156
const Aws::String & GetId() const
Definition Document.h:50
Document & WithHierarchicalAccessControlList(HierarchicalAccessControlListT &&value)
Definition Document.h:191
AWS_KENDRA_API Document & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_KENDRA_API Document(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< HierarchicalPrincipal > & GetHierarchicalAccessControlList() const
Definition Document.h:183
Document & WithTitle(TitleT &&value)
Definition Document.h:76
AWS_KENDRA_API Document()=default
const Aws::Utils::ByteBuffer & GetBlob() const
Definition Document.h:90
void SetTitle(TitleT &&value)
Definition Document.h:71
bool AccessControlListHasBeenSet() const
Definition Document.h:157
void SetContentType(ContentType value)
Definition Document.h:212
const S3Path & GetS3Path() const
Definition Document.h:106
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue