| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | |
|
| | 10 | | namespace Azure.Search.Documents.Indexes.Models |
| | 11 | | { |
| | 12 | | internal static class SnowballTokenFilterLanguageExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this SnowballTokenFilterLanguage value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | SnowballTokenFilterLanguage.Armenian => "armenian", |
| 0 | 17 | | SnowballTokenFilterLanguage.Basque => "basque", |
| 0 | 18 | | SnowballTokenFilterLanguage.Catalan => "catalan", |
| 0 | 19 | | SnowballTokenFilterLanguage.Danish => "danish", |
| 0 | 20 | | SnowballTokenFilterLanguage.Dutch => "dutch", |
| 0 | 21 | | SnowballTokenFilterLanguage.English => "english", |
| 0 | 22 | | SnowballTokenFilterLanguage.Finnish => "finnish", |
| 0 | 23 | | SnowballTokenFilterLanguage.French => "french", |
| 0 | 24 | | SnowballTokenFilterLanguage.German => "german", |
| 0 | 25 | | SnowballTokenFilterLanguage.German2 => "german2", |
| 0 | 26 | | SnowballTokenFilterLanguage.Hungarian => "hungarian", |
| 0 | 27 | | SnowballTokenFilterLanguage.Italian => "italian", |
| 0 | 28 | | SnowballTokenFilterLanguage.Kp => "kp", |
| 0 | 29 | | SnowballTokenFilterLanguage.Lovins => "lovins", |
| 0 | 30 | | SnowballTokenFilterLanguage.Norwegian => "norwegian", |
| 0 | 31 | | SnowballTokenFilterLanguage.Porter => "porter", |
| 0 | 32 | | SnowballTokenFilterLanguage.Portuguese => "portuguese", |
| 0 | 33 | | SnowballTokenFilterLanguage.Romanian => "romanian", |
| 0 | 34 | | SnowballTokenFilterLanguage.Russian => "russian", |
| 0 | 35 | | SnowballTokenFilterLanguage.Spanish => "spanish", |
| 0 | 36 | | SnowballTokenFilterLanguage.Swedish => "swedish", |
| 0 | 37 | | SnowballTokenFilterLanguage.Turkish => "turkish", |
| 0 | 38 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SnowballTokenFilterLanguage value. |
| 0 | 39 | | }; |
| | 40 | |
|
| | 41 | | public static SnowballTokenFilterLanguage ToSnowballTokenFilterLanguage(this string value) |
| | 42 | | { |
| 0 | 43 | | if (string.Equals(value, "armenian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilte |
| 0 | 44 | | if (string.Equals(value, "basque", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 45 | | if (string.Equals(value, "catalan", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 46 | | if (string.Equals(value, "danish", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 47 | | if (string.Equals(value, "dutch", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterLa |
| 0 | 48 | | if (string.Equals(value, "english", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 49 | | if (string.Equals(value, "finnish", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 50 | | if (string.Equals(value, "french", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 51 | | if (string.Equals(value, "german", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 52 | | if (string.Equals(value, "german2", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 53 | | if (string.Equals(value, "hungarian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilt |
| 0 | 54 | | if (string.Equals(value, "italian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 55 | | if (string.Equals(value, "kp", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterLangu |
| 0 | 56 | | if (string.Equals(value, "lovins", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 57 | | if (string.Equals(value, "norwegian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilt |
| 0 | 58 | | if (string.Equals(value, "porter", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilterL |
| 0 | 59 | | if (string.Equals(value, "portuguese", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFil |
| 0 | 60 | | if (string.Equals(value, "romanian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilte |
| 0 | 61 | | if (string.Equals(value, "russian", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 62 | | if (string.Equals(value, "spanish", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 63 | | if (string.Equals(value, "swedish", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 64 | | if (string.Equals(value, "turkish", StringComparison.InvariantCultureIgnoreCase)) return SnowballTokenFilter |
| 0 | 65 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SnowballTokenFilterLanguage value."); |
| | 66 | | } |
| | 67 | | } |
| | 68 | | } |