| | 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 CjkBigramTokenFilterScriptsExtensions |
| | 13 | | { |
| 0 | 14 | | public static string ToSerialString(this CjkBigramTokenFilterScripts value) => value switch |
| 0 | 15 | | { |
| 0 | 16 | | CjkBigramTokenFilterScripts.Han => "han", |
| 0 | 17 | | CjkBigramTokenFilterScripts.Hiragana => "hiragana", |
| 0 | 18 | | CjkBigramTokenFilterScripts.Katakana => "katakana", |
| 0 | 19 | | CjkBigramTokenFilterScripts.Hangul => "hangul", |
| 0 | 20 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CjkBigramTokenFilterScripts value. |
| 0 | 21 | | }; |
| | 22 | |
|
| | 23 | | public static CjkBigramTokenFilterScripts ToCjkBigramTokenFilterScripts(this string value) |
| | 24 | | { |
| 0 | 25 | | if (string.Equals(value, "han", StringComparison.InvariantCultureIgnoreCase)) return CjkBigramTokenFilterScr |
| 0 | 26 | | if (string.Equals(value, "hiragana", StringComparison.InvariantCultureIgnoreCase)) return CjkBigramTokenFilt |
| 0 | 27 | | if (string.Equals(value, "katakana", StringComparison.InvariantCultureIgnoreCase)) return CjkBigramTokenFilt |
| 0 | 28 | | if (string.Equals(value, "hangul", StringComparison.InvariantCultureIgnoreCase)) return CjkBigramTokenFilter |
| 0 | 29 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CjkBigramTokenFilterScripts value."); |
| | 30 | | } |
| | 31 | | } |
| | 32 | | } |