/* * 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 translate-2017-07-01.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.Translate.Model { /// /// Container for the parameters to the TranslateDocument operation. /// Translates the input document from the source language to the target language. This /// synchronous operation supports plain text or HTML for the input document. TranslateDocument /// supports translations from English to any supported language, and from any supported /// language to English. Therefore, specify either the source language code or the target /// language code as “en” (English). /// /// /// /// TranslateDocument does not support language auto-detection. /// /// /// /// If you set the Formality parameter, the request will fail if the target /// language does not support formality. For a list of target languages that support formality, /// see Setting /// formality. /// /// public partial class TranslateDocumentRequest : AmazonTranslateRequest { private Document _document; private TranslationSettings _settings; private string _sourceLanguageCode; private string _targetLanguageCode; private List _terminologyNames = new List(); /// /// Gets and sets the property Document. /// /// The content and content type for the document to be translated. The document size /// must not exceed 100 KB. /// /// [AWSProperty(Required=true)] public Document Document { get { return this._document; } set { this._document = value; } } // Check to see if Document property is set internal bool IsSetDocument() { return this._document != null; } /// /// Gets and sets the property Settings. /// public TranslationSettings Settings { get { return this._settings; } set { this._settings = value; } } // Check to see if Settings property is set internal bool IsSetSettings() { return this._settings != null; } /// /// Gets and sets the property SourceLanguageCode. /// /// The language code for the language of the source text. Do not use auto, /// because TranslateDocument does not support language auto-detection. For /// a list of supported language codes, see Supported /// languages. /// /// [AWSProperty(Required=true, Min=2, Max=5)] public string SourceLanguageCode { get { return this._sourceLanguageCode; } set { this._sourceLanguageCode = value; } } // Check to see if SourceLanguageCode property is set internal bool IsSetSourceLanguageCode() { return this._sourceLanguageCode != null; } /// /// Gets and sets the property TargetLanguageCode. /// /// The language code requested for the translated document. For a list of supported language /// codes, see Supported /// languages. /// /// [AWSProperty(Required=true, Min=2, Max=5)] public string TargetLanguageCode { get { return this._targetLanguageCode; } set { this._targetLanguageCode = value; } } // Check to see if TargetLanguageCode property is set internal bool IsSetTargetLanguageCode() { return this._targetLanguageCode != null; } /// /// Gets and sets the property TerminologyNames. /// /// The name of a terminology list file to add to the translation job. This file provides /// source terms and the desired translation for each term. A terminology list can contain /// a maximum of 256 terms. You can use one custom terminology resource in your translation /// request. /// /// /// /// Use the ListTerminologies operation to get the available terminology lists. /// /// /// /// For more information about custom terminology lists, see Custom /// terminology. /// /// public List TerminologyNames { get { return this._terminologyNames; } set { this._terminologyNames = value; } } // Check to see if TerminologyNames property is set internal bool IsSetTerminologyNames() { return this._terminologyNames != null && this._terminologyNames.Count > 0; } } }