| | | 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 EdgeNGramTokenFilterSideExtensions |
| | | 13 | | { |
| | 2 | 14 | | public static string ToSerialString(this EdgeNGramTokenFilterSide value) => value switch |
| | 2 | 15 | | { |
| | 4 | 16 | | EdgeNGramTokenFilterSide.Front => "front", |
| | 0 | 17 | | EdgeNGramTokenFilterSide.Back => "back", |
| | 0 | 18 | | _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EdgeNGramTokenFilterSide value.") |
| | 2 | 19 | | }; |
| | | 20 | | |
| | | 21 | | public static EdgeNGramTokenFilterSide ToEdgeNGramTokenFilterSide(this string value) |
| | | 22 | | { |
| | 4 | 23 | | if (string.Equals(value, "front", StringComparison.InvariantCultureIgnoreCase)) return EdgeNGramTokenFilterS |
| | 0 | 24 | | if (string.Equals(value, "back", StringComparison.InvariantCultureIgnoreCase)) return EdgeNGramTokenFilterSi |
| | 0 | 25 | | throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EdgeNGramTokenFilterSide value."); |
| | | 26 | | } |
| | | 27 | | } |
| | | 28 | | } |