|  |  | 1 |  | // | 
|  |  | 2 |  | // Copyright (c) Microsoft Corporation. All rights reserved. | 
|  |  | 3 |  | // Licensed under the MIT License. See License.txt in the project root for | 
|  |  | 4 |  | // license information. | 
|  |  | 5 |  | // | 
|  |  | 6 |  |  | 
|  |  | 7 |  | namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models | 
|  |  | 8 |  | { | 
|  |  | 9 |  |     using Newtonsoft.Json; | 
|  |  | 10 |  |     using System.Collections.Generic; | 
|  |  | 11 |  |  | 
|  |  | 12 |  |     public partial class LanguageResult | 
|  |  | 13 |  |     { | 
|  |  | 14 |  |         /// <summary> | 
|  |  | 15 |  |         /// Initializes a new instance of the LanguageResult class. | 
|  |  | 16 |  |         /// </summary> | 
|  | 0 | 17 |  |         public LanguageResult() | 
|  |  | 18 |  |         { | 
|  |  | 19 |  |             CustomInit(); | 
|  | 0 | 20 |  |         } | 
|  |  | 21 |  |  | 
|  |  | 22 |  |         /// <summary> | 
|  |  | 23 |  |         /// Initializes a new instance of the LanguageResult class. | 
|  |  | 24 |  |         /// </summary> | 
|  |  | 25 |  |         /// <param name="detectedLanguages">A list of extracted languages.</param> | 
|  |  | 26 |  |         /// <param name="errorMessage">Error or Warning related to the document.</param> | 
|  |  | 27 |  |         /// <param name="statistics">(Optional) if showStats=true was specified | 
|  |  | 28 |  |         /// in the request this field will contain information about the | 
|  |  | 29 |  |         /// request payload.</param> | 
|  | 2 | 30 |  |         public LanguageResult(IList<DetectedLanguage> detectedLanguages = default(IList<DetectedLanguage>), string error | 
|  |  | 31 |  |         { | 
|  | 2 | 32 |  |             DetectedLanguages = detectedLanguages; | 
|  | 2 | 33 |  |             ErrorMessage = errorMessage; | 
|  | 2 | 34 |  |             Statistics = statistics; | 
|  |  | 35 |  |             CustomInit(); | 
|  | 2 | 36 |  |         } | 
|  |  | 37 |  |  | 
|  |  | 38 |  |         /// <summary> | 
|  |  | 39 |  |         /// An initialization method that performs custom operations like setting defaults | 
|  |  | 40 |  |         /// </summary> | 
|  |  | 41 |  |         partial void CustomInit(); | 
|  |  | 42 |  |  | 
|  |  | 43 |  |         /// <summary> | 
|  |  | 44 |  |         /// Gets or sets a list of extracted languages. | 
|  |  | 45 |  |         /// </summary> | 
|  |  | 46 |  |         [JsonProperty(PropertyName = "detectedLanguages")] | 
|  | 8 | 47 |  |         public IList<DetectedLanguage> DetectedLanguages { get; set; } | 
|  |  | 48 |  |  | 
|  |  | 49 |  |         /// <summary> | 
|  |  | 50 |  |         /// Gets error or warning for the request. | 
|  |  | 51 |  |         /// </summary> | 
|  |  | 52 |  |         [JsonProperty(PropertyName = "ErrorMessage")] | 
|  | 0 | 53 |  |         public string ErrorMessage { get; private set; } | 
|  |  | 54 |  |  | 
|  |  | 55 |  |         /// <summary> | 
|  |  | 56 |  |         /// Gets (Optional) if showStats=true was specified in the request this | 
|  |  | 57 |  |         /// field will contain information about the request payload. | 
|  |  | 58 |  |         /// </summary> | 
|  |  | 59 |  |         [JsonProperty(PropertyName = "statistics")] | 
|  | 0 | 60 |  |         public RequestStatistics Statistics { get; private set; } | 
|  |  | 61 |  |  | 
|  |  | 62 |  |     } | 
|  |  | 63 |  | } |