| | 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.FormRecognizer.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 TextOperationStatusCodes. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum TextOperationStatusCodes |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "Not Started")] |
| | 25 | | NotStarted, |
| | 26 | | [EnumMember(Value = "Running")] |
| | 27 | | Running, |
| | 28 | | [EnumMember(Value = "Failed")] |
| | 29 | | Failed, |
| | 30 | | [EnumMember(Value = "Succeeded")] |
| | 31 | | Succeeded |
| | 32 | | } |
| | 33 | | internal static class TextOperationStatusCodesEnumExtension |
| | 34 | | { |
| | 35 | | internal static string ToSerializedValue(this TextOperationStatusCodes? value) |
| | 36 | | { |
| 0 | 37 | | return value == null ? null : ((TextOperationStatusCodes)value).ToSerializedValue(); |
| | 38 | | } |
| | 39 | |
|
| | 40 | | internal static string ToSerializedValue(this TextOperationStatusCodes value) |
| | 41 | | { |
| | 42 | | switch( value ) |
| | 43 | | { |
| | 44 | | case TextOperationStatusCodes.NotStarted: |
| 0 | 45 | | return "Not Started"; |
| | 46 | | case TextOperationStatusCodes.Running: |
| 0 | 47 | | return "Running"; |
| | 48 | | case TextOperationStatusCodes.Failed: |
| 0 | 49 | | return "Failed"; |
| | 50 | | case TextOperationStatusCodes.Succeeded: |
| 0 | 51 | | return "Succeeded"; |
| | 52 | | } |
| 0 | 53 | | return null; |
| | 54 | | } |
| | 55 | |
|
| | 56 | | internal static TextOperationStatusCodes? ParseTextOperationStatusCodes(this string value) |
| | 57 | | { |
| | 58 | | switch( value ) |
| | 59 | | { |
| | 60 | | case "Not Started": |
| 0 | 61 | | return TextOperationStatusCodes.NotStarted; |
| | 62 | | case "Running": |
| 0 | 63 | | return TextOperationStatusCodes.Running; |
| | 64 | | case "Failed": |
| 0 | 65 | | return TextOperationStatusCodes.Failed; |
| | 66 | | case "Succeeded": |
| 0 | 67 | | return TextOperationStatusCodes.Succeeded; |
| | 68 | | } |
| 0 | 69 | | return null; |
| | 70 | | } |
| | 71 | | } |
| | 72 | | } |