/** * 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 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 AWS_KENDRA_API Document { public: Document(); Document(Aws::Utils::Json::JsonView jsonValue); Document& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

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

A unique identifier of the document in the index.

*/ 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 AWS SDK to call Amazon Kendra * operations. 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 AWS SDK to call Amazon Kendra * operations. 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 AWS SDK to call Amazon Kendra * operations. 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 AWS SDK to call Amazon Kendra * operations. 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 AWS SDK to call Amazon Kendra * operations. 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 AWS SDK to call Amazon Kendra * operations. 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

Information to use for user context filtering.

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

The file type of the document in the Blob field.

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

The file type of the document in the Blob field.

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

The file type of the document in the Blob field.

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

The file type of the document in the Blob field.

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

The file type of the document in the Blob field.

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

The file type of the document in the Blob field.

*/ inline Document& WithContentType(ContentType&& value) { SetContentType(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::String m_title; bool m_titleHasBeenSet; Aws::Utils::ByteBuffer m_blob; bool m_blobHasBeenSet; S3Path m_s3Path; bool m_s3PathHasBeenSet; Aws::Vector m_attributes; bool m_attributesHasBeenSet; Aws::Vector m_accessControlList; bool m_accessControlListHasBeenSet; ContentType m_contentType; bool m_contentTypeHasBeenSet; }; } // namespace Model } // namespace kendra } // namespace Aws