| | 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 PhoneticEncoder. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum PhoneticEncoder |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "metaphone")] |
| | 25 | | Metaphone, |
| | 26 | | [EnumMember(Value = "doubleMetaphone")] |
| | 27 | | DoubleMetaphone, |
| | 28 | | [EnumMember(Value = "soundex")] |
| | 29 | | Soundex, |
| | 30 | | [EnumMember(Value = "refinedSoundex")] |
| | 31 | | RefinedSoundex, |
| | 32 | | [EnumMember(Value = "caverphone1")] |
| | 33 | | Caverphone1, |
| | 34 | | [EnumMember(Value = "caverphone2")] |
| | 35 | | Caverphone2, |
| | 36 | | [EnumMember(Value = "cologne")] |
| | 37 | | Cologne, |
| | 38 | | [EnumMember(Value = "nysiis")] |
| | 39 | | Nysiis, |
| | 40 | | [EnumMember(Value = "koelnerPhonetik")] |
| | 41 | | KoelnerPhonetik, |
| | 42 | | [EnumMember(Value = "haasePhonetik")] |
| | 43 | | HaasePhonetik, |
| | 44 | | [EnumMember(Value = "beiderMorse")] |
| | 45 | | BeiderMorse |
| | 46 | | } |
| | 47 | | internal static class PhoneticEncoderEnumExtension |
| | 48 | | { |
| | 49 | | internal static string ToSerializedValue(this PhoneticEncoder? value) |
| | 50 | | { |
| 0 | 51 | | return value == null ? null : ((PhoneticEncoder)value).ToSerializedValue(); |
| | 52 | | } |
| | 53 | |
|
| | 54 | | internal static string ToSerializedValue(this PhoneticEncoder value) |
| | 55 | | { |
| | 56 | | switch( value ) |
| | 57 | | { |
| | 58 | | case PhoneticEncoder.Metaphone: |
| 0 | 59 | | return "metaphone"; |
| | 60 | | case PhoneticEncoder.DoubleMetaphone: |
| 0 | 61 | | return "doubleMetaphone"; |
| | 62 | | case PhoneticEncoder.Soundex: |
| 0 | 63 | | return "soundex"; |
| | 64 | | case PhoneticEncoder.RefinedSoundex: |
| 0 | 65 | | return "refinedSoundex"; |
| | 66 | | case PhoneticEncoder.Caverphone1: |
| 0 | 67 | | return "caverphone1"; |
| | 68 | | case PhoneticEncoder.Caverphone2: |
| 0 | 69 | | return "caverphone2"; |
| | 70 | | case PhoneticEncoder.Cologne: |
| 0 | 71 | | return "cologne"; |
| | 72 | | case PhoneticEncoder.Nysiis: |
| 0 | 73 | | return "nysiis"; |
| | 74 | | case PhoneticEncoder.KoelnerPhonetik: |
| 0 | 75 | | return "koelnerPhonetik"; |
| | 76 | | case PhoneticEncoder.HaasePhonetik: |
| 0 | 77 | | return "haasePhonetik"; |
| | 78 | | case PhoneticEncoder.BeiderMorse: |
| 0 | 79 | | return "beiderMorse"; |
| | 80 | | } |
| 0 | 81 | | return null; |
| | 82 | | } |
| | 83 | |
|
| | 84 | | internal static PhoneticEncoder? ParsePhoneticEncoder(this string value) |
| | 85 | | { |
| | 86 | | switch( value ) |
| | 87 | | { |
| | 88 | | case "metaphone": |
| 0 | 89 | | return PhoneticEncoder.Metaphone; |
| | 90 | | case "doubleMetaphone": |
| 0 | 91 | | return PhoneticEncoder.DoubleMetaphone; |
| | 92 | | case "soundex": |
| 0 | 93 | | return PhoneticEncoder.Soundex; |
| | 94 | | case "refinedSoundex": |
| 0 | 95 | | return PhoneticEncoder.RefinedSoundex; |
| | 96 | | case "caverphone1": |
| 0 | 97 | | return PhoneticEncoder.Caverphone1; |
| | 98 | | case "caverphone2": |
| 0 | 99 | | return PhoneticEncoder.Caverphone2; |
| | 100 | | case "cologne": |
| 0 | 101 | | return PhoneticEncoder.Cologne; |
| | 102 | | case "nysiis": |
| 0 | 103 | | return PhoneticEncoder.Nysiis; |
| | 104 | | case "koelnerPhonetik": |
| 0 | 105 | | return PhoneticEncoder.KoelnerPhonetik; |
| | 106 | | case "haasePhonetik": |
| 0 | 107 | | return PhoneticEncoder.HaasePhonetik; |
| | 108 | | case "beiderMorse": |
| 0 | 109 | | return PhoneticEncoder.BeiderMorse; |
| | 110 | | } |
| 0 | 111 | | return null; |
| | 112 | | } |
| | 113 | | } |
| | 114 | | } |