| | 1 | | // <auto-generated> |
| | 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 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using Newtonsoft.Json.Converters; |
| | 15 | | using System.Runtime; |
| | 16 | | using System.Runtime.Serialization; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Defines values for TrainingStatus. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum TrainingStatus |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "NeedsTraining")] |
| | 25 | | NeedsTraining, |
| | 26 | | [EnumMember(Value = "InProgress")] |
| | 27 | | InProgress, |
| | 28 | | [EnumMember(Value = "Trained")] |
| | 29 | | Trained |
| | 30 | | } |
| | 31 | | internal static class TrainingStatusEnumExtension |
| | 32 | | { |
| | 33 | | internal static string ToSerializedValue(this TrainingStatus? value) |
| | 34 | | { |
| 0 | 35 | | return value == null ? null : ((TrainingStatus)value).ToSerializedValue(); |
| | 36 | | } |
| | 37 | |
|
| | 38 | | internal static string ToSerializedValue(this TrainingStatus value) |
| | 39 | | { |
| | 40 | | switch( value ) |
| | 41 | | { |
| | 42 | | case TrainingStatus.NeedsTraining: |
| 0 | 43 | | return "NeedsTraining"; |
| | 44 | | case TrainingStatus.InProgress: |
| 0 | 45 | | return "InProgress"; |
| | 46 | | case TrainingStatus.Trained: |
| 0 | 47 | | return "Trained"; |
| | 48 | | } |
| 0 | 49 | | return null; |
| | 50 | | } |
| | 51 | |
|
| | 52 | | internal static TrainingStatus? ParseTrainingStatus(this string value) |
| | 53 | | { |
| | 54 | | switch( value ) |
| | 55 | | { |
| | 56 | | case "NeedsTraining": |
| 0 | 57 | | return TrainingStatus.NeedsTraining; |
| | 58 | | case "InProgress": |
| 0 | 59 | | return TrainingStatus.InProgress; |
| | 60 | | case "Trained": |
| 0 | 61 | | return TrainingStatus.Trained; |
| | 62 | | } |
| 0 | 63 | | return null; |
| | 64 | | } |
| | 65 | | } |
| | 66 | | } |