| | 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 StopwordsListExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this StopwordsList value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | StopwordsList.Arabic => "arabic", |
| 0 | 17 | | StopwordsList.Armenian => "armenian", |
| 0 | 18 | | StopwordsList.Basque => "basque", |
| 0 | 19 | | StopwordsList.Brazilian => "brazilian", |
| 0 | 20 | | StopwordsList.Bulgarian => "bulgarian", |
| 0 | 21 | | StopwordsList.Catalan => "catalan", |
| 0 | 22 | | StopwordsList.Czech => "czech", |
| 0 | 23 | | StopwordsList.Danish => "danish", |
| 0 | 24 | | StopwordsList.Dutch => "dutch", |
| 0 | 25 | | StopwordsList.English => "english", |
| 0 | 26 | | StopwordsList.Finnish => "finnish", |
| 0 | 27 | | StopwordsList.French => "french", |
| 0 | 28 | | StopwordsList.Galician => "galician", |
| 0 | 29 | | StopwordsList.German => "german", |
| 0 | 30 | | StopwordsList.Greek => "greek", |
| 0 | 31 | | StopwordsList.Hindi => "hindi", |
| 0 | 32 | | StopwordsList.Hungarian => "hungarian", |
| 0 | 33 | | StopwordsList.Indonesian => "indonesian", |
| 0 | 34 | | StopwordsList.Irish => "irish", |
| 0 | 35 | | StopwordsList.Italian => "italian", |
| 0 | 36 | | StopwordsList.Latvian => "latvian", |
| 0 | 37 | | StopwordsList.Norwegian => "norwegian", |
| 0 | 38 | | StopwordsList.Persian => "persian", |
| 0 | 39 | | StopwordsList.Portuguese => "portuguese", |
| 0 | 40 | | StopwordsList.Romanian => "romanian", |
| 0 | 41 | | StopwordsList.Russian => "russian", |
| 0 | 42 | | StopwordsList.Sorani => "sorani", |
| 0 | 43 | | StopwordsList.Spanish => "spanish", |
| 0 | 44 | | StopwordsList.Swedish => "swedish", |
| 0 | 45 | | StopwordsList.Thai => "thai", |
| 0 | 46 | | StopwordsList.Turkish => "turkish", |
| 0 | 47 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StopwordsList value.") |
| 0 | 48 | | }; |
| | 49 | |
|
| | 50 | | public static StopwordsList ToStopwordsList(this string value) |
| | 51 | | { |
| 0 | 52 | | if (string.Equals(value, "arabic", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Arabic |
| 0 | 53 | | if (string.Equals(value, "armenian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Arme |
| 0 | 54 | | if (string.Equals(value, "basque", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Basque |
| 0 | 55 | | if (string.Equals(value, "brazilian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Bra |
| 0 | 56 | | if (string.Equals(value, "bulgarian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Bul |
| 0 | 57 | | if (string.Equals(value, "catalan", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Catal |
| 0 | 58 | | if (string.Equals(value, "czech", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Czech; |
| 0 | 59 | | if (string.Equals(value, "danish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Danish |
| 0 | 60 | | if (string.Equals(value, "dutch", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Dutch; |
| 0 | 61 | | if (string.Equals(value, "english", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Engli |
| 0 | 62 | | if (string.Equals(value, "finnish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Finni |
| 0 | 63 | | if (string.Equals(value, "french", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.French |
| 0 | 64 | | if (string.Equals(value, "galician", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Gali |
| 0 | 65 | | if (string.Equals(value, "german", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.German |
| 0 | 66 | | if (string.Equals(value, "greek", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Greek; |
| 0 | 67 | | if (string.Equals(value, "hindi", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Hindi; |
| 0 | 68 | | if (string.Equals(value, "hungarian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Hun |
| 0 | 69 | | if (string.Equals(value, "indonesian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.In |
| 0 | 70 | | if (string.Equals(value, "irish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Irish; |
| 0 | 71 | | if (string.Equals(value, "italian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Itali |
| 0 | 72 | | if (string.Equals(value, "latvian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Latvi |
| 0 | 73 | | if (string.Equals(value, "norwegian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Nor |
| 0 | 74 | | if (string.Equals(value, "persian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Persi |
| 0 | 75 | | if (string.Equals(value, "portuguese", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Po |
| 0 | 76 | | if (string.Equals(value, "romanian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Roma |
| 0 | 77 | | if (string.Equals(value, "russian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Russi |
| 0 | 78 | | if (string.Equals(value, "sorani", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Sorani |
| 0 | 79 | | if (string.Equals(value, "spanish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Spani |
| 0 | 80 | | if (string.Equals(value, "swedish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Swedi |
| 0 | 81 | | if (string.Equals(value, "thai", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Thai; |
| 0 | 82 | | if (string.Equals(value, "turkish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Turki |
| 0 | 83 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StopwordsList value."); |
| | 84 | | } |
| | 85 | | } |
| | 86 | | } |