/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the kendra-2019-02-03.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Kendra.Model { /// /// A document in an index. /// public partial class Document { private string _accessControlConfigurationId; private List _accessControlList = new List(); private List _attributes = new List(); private MemoryStream _blob; private ContentType _contentType; private List _hierarchicalAccessControlList = new List(); private string _id; private S3Path _s3Path; private string _title; /// /// Gets and sets the property AccessControlConfigurationId. /// /// The identifier of the access control configuration that you want to apply to the document. /// /// [AWSProperty(Min=1, Max=36)] public string AccessControlConfigurationId { get { return this._accessControlConfigurationId; } set { this._accessControlConfigurationId = value; } } // Check to see if AccessControlConfigurationId property is set internal bool IsSetAccessControlConfigurationId() { return this._accessControlConfigurationId != null; } /// /// Gets and sets the property 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. /// /// public List AccessControlList { get { return this._accessControlList; } set { this._accessControlList = value; } } // Check to see if AccessControlList property is set internal bool IsSetAccessControlList() { return this._accessControlList != null && this._accessControlList.Count > 0; } /// /// Gets and sets the property 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. /// /// public List Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// /// Gets and sets the property 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. /// /// public MemoryStream Blob { get { return this._blob; } set { this._blob = value; } } // Check to see if Blob property is set internal bool IsSetBlob() { return this._blob != null; } /// /// Gets and sets the property 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. /// /// public ContentType ContentType { get { return this._contentType; } set { this._contentType = value; } } // Check to see if ContentType property is set internal bool IsSetContentType() { return this._contentType != null; } /// /// Gets and sets the property HierarchicalAccessControlList. /// /// The list of principal /// lists that define the hierarchy for which documents users should have access to. /// /// [AWSProperty(Min=1, Max=30)] public List HierarchicalAccessControlList { get { return this._hierarchicalAccessControlList; } set { this._hierarchicalAccessControlList = value; } } // Check to see if HierarchicalAccessControlList property is set internal bool IsSetHierarchicalAccessControlList() { return this._hierarchicalAccessControlList != null && this._hierarchicalAccessControlList.Count > 0; } /// /// Gets and sets the property 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. /// /// [AWSProperty(Required=true, Min=1, Max=2048)] public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// /// Gets and sets the property S3Path. /// public S3Path S3Path { get { return this._s3Path; } set { this._s3Path = value; } } // Check to see if S3Path property is set internal bool IsSetS3Path() { return this._s3Path != null; } /// /// Gets and sets the property Title. /// /// The title of the document. /// /// public string Title { get { return this._title; } set { this._title = value; } } // Check to see if Title property is set internal bool IsSetTitle() { return this._title != null; } } }