/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { /** *

A document in an index.

See Also:

AWS API * Reference

*/ class Document { public: AWS_KENDRA_API Document(); AWS_KENDRA_API Document(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Document& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline Document& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline Document& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

A identifier of the document in the index.

Note, each document ID must * be unique per index. You cannot create a data source to index your documents * with their unique IDs and then use the BatchPutDocument API to * index the same documents, or vice versa. You can delete a data source and then * use the BatchPutDocument API to index the same documents, or vice * versa.

*/ inline Document& WithId(const char* value) { SetId(value); return *this;} /** *

The title of the document.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

The title of the document.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

The title of the document.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

The title of the document.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

The title of the document.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

The title of the document.

*/ inline Document& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

The title of the document.

*/ inline Document& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

The title of the document.

*/ inline Document& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline const Aws::Utils::ByteBuffer& GetBlob() const{ return m_blob; } /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline bool BlobHasBeenSet() const { return m_blobHasBeenSet; } /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline void SetBlob(const Aws::Utils::ByteBuffer& value) { m_blobHasBeenSet = true; m_blob = value; } /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline void SetBlob(Aws::Utils::ByteBuffer&& value) { m_blobHasBeenSet = true; m_blob = std::move(value); } /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline Document& WithBlob(const Aws::Utils::ByteBuffer& value) { SetBlob(value); return *this;} /** *

The contents of the document.

Documents passed to the * Blob parameter must be base64 encoded. Your code might not need to * encode the document file bytes if you're using an Amazon Web Services SDK to * call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly * using REST, you must base64 encode the contents before sending.

*/ inline Document& WithBlob(Aws::Utils::ByteBuffer&& value) { SetBlob(std::move(value)); return *this;} inline const S3Path& GetS3Path() const{ return m_s3Path; } inline bool S3PathHasBeenSet() const { return m_s3PathHasBeenSet; } inline void SetS3Path(const S3Path& value) { m_s3PathHasBeenSet = true; m_s3Path = value; } inline void SetS3Path(S3Path&& value) { m_s3PathHasBeenSet = true; m_s3Path = std::move(value); } inline Document& WithS3Path(const S3Path& value) { SetS3Path(value); return *this;} inline Document& WithS3Path(S3Path&& value) { SetS3Path(std::move(value)); return *this;} /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline const Aws::Vector& GetAttributes() const{ return m_attributes; } /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline void SetAttributes(const Aws::Vector& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline void SetAttributes(Aws::Vector&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline Document& WithAttributes(const Aws::Vector& value) { SetAttributes(value); return *this;} /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline Document& WithAttributes(Aws::Vector&& value) { SetAttributes(std::move(value)); return *this;} /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline Document& AddAttributes(const DocumentAttribute& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; } /** *

Custom attributes to apply to the document. Use the custom attributes to * provide additional information for searching, to provide facets for refining * searches, and to provide additional information in the query response.

*

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes * that provide information on the synchronization of documents running on a data * source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as * Amazon Kendra will use the ID of a running sync job.

*/ inline Document& AddAttributes(DocumentAttribute&& value) { m_attributesHasBeenSet = true; m_attributes.push_back(std::move(value)); return *this; } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline const Aws::Vector& GetAccessControlList() const{ return m_accessControlList; } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline bool AccessControlListHasBeenSet() const { return m_accessControlListHasBeenSet; } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline void SetAccessControlList(const Aws::Vector& value) { m_accessControlListHasBeenSet = true; m_accessControlList = value; } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline void SetAccessControlList(Aws::Vector&& value) { m_accessControlListHasBeenSet = true; m_accessControlList = std::move(value); } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline Document& WithAccessControlList(const Aws::Vector& value) { SetAccessControlList(value); return *this;} /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline Document& WithAccessControlList(Aws::Vector&& value) { SetAccessControlList(std::move(value)); return *this;} /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline Document& AddAccessControlList(const Principal& value) { m_accessControlListHasBeenSet = true; m_accessControlList.push_back(value); return *this; } /** *

Information on principals (users and/or groups) and which documents they * should have access to. This is useful for user context filtering, where search * results are filtered based on the user or their group access to documents.

*/ inline Document& AddAccessControlList(Principal&& value) { m_accessControlListHasBeenSet = true; m_accessControlList.push_back(std::move(value)); return *this; } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline const Aws::Vector& GetHierarchicalAccessControlList() const{ return m_hierarchicalAccessControlList; } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline bool HierarchicalAccessControlListHasBeenSet() const { return m_hierarchicalAccessControlListHasBeenSet; } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline void SetHierarchicalAccessControlList(const Aws::Vector& value) { m_hierarchicalAccessControlListHasBeenSet = true; m_hierarchicalAccessControlList = value; } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline void SetHierarchicalAccessControlList(Aws::Vector&& value) { m_hierarchicalAccessControlListHasBeenSet = true; m_hierarchicalAccessControlList = std::move(value); } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline Document& WithHierarchicalAccessControlList(const Aws::Vector& value) { SetHierarchicalAccessControlList(value); return *this;} /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline Document& WithHierarchicalAccessControlList(Aws::Vector&& value) { SetHierarchicalAccessControlList(std::move(value)); return *this;} /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline Document& AddHierarchicalAccessControlList(const HierarchicalPrincipal& value) { m_hierarchicalAccessControlListHasBeenSet = true; m_hierarchicalAccessControlList.push_back(value); return *this; } /** *

The list of principal * lists that define the hierarchy for which documents users should have access * to.

*/ inline Document& AddHierarchicalAccessControlList(HierarchicalPrincipal&& value) { m_hierarchicalAccessControlListHasBeenSet = true; m_hierarchicalAccessControlList.push_back(std::move(value)); return *this; } /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline const ContentType& GetContentType() const{ return m_contentType; } /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; } /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline void SetContentType(const ContentType& value) { m_contentTypeHasBeenSet = true; m_contentType = value; } /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline void SetContentType(ContentType&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); } /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline Document& WithContentType(const ContentType& value) { SetContentType(value); return *this;} /** *

The file type of the document in the Blob field.

If you * want to index snippets or subsets of HTML documents instead of the entirety of * the HTML documents, you must add the HTML start and closing tags * (<HTML>content</HTML>) around the content.

*/ inline Document& WithContentType(ContentType&& value) { SetContentType(std::move(value)); return *this;} /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline const Aws::String& GetAccessControlConfigurationId() const{ return m_accessControlConfigurationId; } /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline bool AccessControlConfigurationIdHasBeenSet() const { return m_accessControlConfigurationIdHasBeenSet; } /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline void SetAccessControlConfigurationId(const Aws::String& value) { m_accessControlConfigurationIdHasBeenSet = true; m_accessControlConfigurationId = value; } /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline void SetAccessControlConfigurationId(Aws::String&& value) { m_accessControlConfigurationIdHasBeenSet = true; m_accessControlConfigurationId = std::move(value); } /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline void SetAccessControlConfigurationId(const char* value) { m_accessControlConfigurationIdHasBeenSet = true; m_accessControlConfigurationId.assign(value); } /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline Document& WithAccessControlConfigurationId(const Aws::String& value) { SetAccessControlConfigurationId(value); return *this;} /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline Document& WithAccessControlConfigurationId(Aws::String&& value) { SetAccessControlConfigurationId(std::move(value)); return *this;} /** *

The identifier of the access control configuration that you want to apply to * the document.

*/ inline Document& WithAccessControlConfigurationId(const char* value) { SetAccessControlConfigurationId(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_title; bool m_titleHasBeenSet = false; Aws::Utils::ByteBuffer m_blob; bool m_blobHasBeenSet = false; S3Path m_s3Path; bool m_s3PathHasBeenSet = false; Aws::Vector m_attributes; bool m_attributesHasBeenSet = false; Aws::Vector m_accessControlList; bool m_accessControlListHasBeenSet = false; Aws::Vector m_hierarchicalAccessControlList; bool m_hierarchicalAccessControlListHasBeenSet = false; ContentType m_contentType; bool m_contentTypeHasBeenSet = false; Aws::String m_accessControlConfigurationId; bool m_accessControlConfigurationIdHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws