| | 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 TokenCharacterKind. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum TokenCharacterKind |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "letter")] |
| | 25 | | Letter, |
| | 26 | | [EnumMember(Value = "digit")] |
| | 27 | | Digit, |
| | 28 | | [EnumMember(Value = "whitespace")] |
| | 29 | | Whitespace, |
| | 30 | | [EnumMember(Value = "punctuation")] |
| | 31 | | Punctuation, |
| | 32 | | [EnumMember(Value = "symbol")] |
| | 33 | | Symbol |
| | 34 | | } |
| | 35 | | internal static class TokenCharacterKindEnumExtension |
| | 36 | | { |
| | 37 | | internal static string ToSerializedValue(this TokenCharacterKind? value) |
| | 38 | | { |
| 0 | 39 | | return value == null ? null : ((TokenCharacterKind)value).ToSerializedValue(); |
| | 40 | | } |
| | 41 | |
|
| | 42 | | internal static string ToSerializedValue(this TokenCharacterKind value) |
| | 43 | | { |
| | 44 | | switch( value ) |
| | 45 | | { |
| | 46 | | case TokenCharacterKind.Letter: |
| 0 | 47 | | return "letter"; |
| | 48 | | case TokenCharacterKind.Digit: |
| 0 | 49 | | return "digit"; |
| | 50 | | case TokenCharacterKind.Whitespace: |
| 0 | 51 | | return "whitespace"; |
| | 52 | | case TokenCharacterKind.Punctuation: |
| 0 | 53 | | return "punctuation"; |
| | 54 | | case TokenCharacterKind.Symbol: |
| 0 | 55 | | return "symbol"; |
| | 56 | | } |
| 0 | 57 | | return null; |
| | 58 | | } |
| | 59 | |
|
| | 60 | | internal static TokenCharacterKind? ParseTokenCharacterKind(this string value) |
| | 61 | | { |
| | 62 | | switch( value ) |
| | 63 | | { |
| | 64 | | case "letter": |
| 0 | 65 | | return TokenCharacterKind.Letter; |
| | 66 | | case "digit": |
| 0 | 67 | | return TokenCharacterKind.Digit; |
| | 68 | | case "whitespace": |
| 0 | 69 | | return TokenCharacterKind.Whitespace; |
| | 70 | | case "punctuation": |
| 0 | 71 | | return TokenCharacterKind.Punctuation; |
| | 72 | | case "symbol": |
| 0 | 73 | | return TokenCharacterKind.Symbol; |
| | 74 | | } |
| 0 | 75 | | return null; |
| | 76 | | } |
| | 77 | | } |
| | 78 | | } |