/* * 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 comprehend-2017-11-27.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.Comprehend.Model { /// /// Container for the parameters to the ClassifyDocument operation. /// Creates a new document classification request to analyze a single document in real-time, /// using a previously created and trained custom model and an endpoint. /// /// /// /// You can input plain text or you can upload a single-page input document (text, PDF, /// Word, or image). /// /// /// /// If the system detects errors while processing a page in the input document, the API /// response includes an entry in Errors that describes the errors. /// /// /// /// If the system detects a document-level error in your input document, the API returns /// an InvalidRequestException error response. For details about this exception, /// see /// Errors in semi-structured documents in the Comprehend Developer Guide. /// /// public partial class ClassifyDocumentRequest : AmazonComprehendRequest { private MemoryStream _bytes; private DocumentReaderConfig _documentReaderConfig; private string _endpointArn; private string _text; /// /// Gets and sets the property Bytes. /// /// Use the Bytes parameter to input a text, PDF, Word or image file. You /// can also use the Bytes parameter to input an Amazon Textract DetectDocumentText /// or AnalyzeDocument output file. /// /// /// /// Provide the input document as a sequence of base64-encoded bytes. If your code uses /// an Amazon Web Services SDK to classify documents, the SDK may encode the document /// file bytes for you. /// /// /// /// The maximum length of this field depends on the input document type. For details, /// see /// Inputs for real-time custom analysis in the Comprehend Developer Guide. /// /// /// /// If you use the Bytes parameter, do not use the Text parameter. /// /// [AWSProperty(Min=1)] public MemoryStream Bytes { get { return this._bytes; } set { this._bytes = value; } } // Check to see if Bytes property is set internal bool IsSetBytes() { return this._bytes != null; } /// /// Gets and sets the property DocumentReaderConfig. /// /// Provides configuration parameters to override the default actions for extracting text /// from PDF documents and image files. /// /// public DocumentReaderConfig DocumentReaderConfig { get { return this._documentReaderConfig; } set { this._documentReaderConfig = value; } } // Check to see if DocumentReaderConfig property is set internal bool IsSetDocumentReaderConfig() { return this._documentReaderConfig != null; } /// /// Gets and sets the property EndpointArn. /// /// The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, /// see Managing /// endpoints. /// /// [AWSProperty(Required=true, Max=256)] public string EndpointArn { get { return this._endpointArn; } set { this._endpointArn = value; } } // Check to see if EndpointArn property is set internal bool IsSetEndpointArn() { return this._endpointArn != null; } /// /// Gets and sets the property Text. /// /// The document text to be analyzed. If you enter text using this parameter, do not use /// the Bytes parameter. /// /// [AWSProperty(Sensitive=true, Min=1)] public string Text { get { return this._text; } set { this._text = value; } } // Check to see if Text property is set internal bool IsSetText() { return this._text != null; } } }