| | 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.Search.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 TextExtractionAlgorithm. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum TextExtractionAlgorithm |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "printed")] |
| | 25 | | Printed, |
| | 26 | | [EnumMember(Value = "handwritten")] |
| | 27 | | Handwritten |
| | 28 | | } |
| | 29 | | internal static class TextExtractionAlgorithmEnumExtension |
| | 30 | | { |
| | 31 | | internal static string ToSerializedValue(this TextExtractionAlgorithm? value) |
| | 32 | | { |
| 0 | 33 | | return value == null ? null : ((TextExtractionAlgorithm)value).ToSerializedValue(); |
| | 34 | | } |
| | 35 | |
|
| | 36 | | internal static string ToSerializedValue(this TextExtractionAlgorithm value) |
| | 37 | | { |
| | 38 | | switch( value ) |
| | 39 | | { |
| | 40 | | case TextExtractionAlgorithm.Printed: |
| 0 | 41 | | return "printed"; |
| | 42 | | case TextExtractionAlgorithm.Handwritten: |
| 0 | 43 | | return "handwritten"; |
| | 44 | | } |
| 0 | 45 | | return null; |
| | 46 | | } |
| | 47 | |
|
| | 48 | | internal static TextExtractionAlgorithm? ParseTextExtractionAlgorithm(this string value) |
| | 49 | | { |
| | 50 | | switch( value ) |
| | 51 | | { |
| | 52 | | case "printed": |
| 0 | 53 | | return TextExtractionAlgorithm.Printed; |
| | 54 | | case "handwritten": |
| 0 | 55 | | return TextExtractionAlgorithm.Handwritten; |
| | 56 | | } |
| 0 | 57 | | return null; |
| | 58 | | } |
| | 59 | | } |
| | 60 | | } |