| | 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 | | /// <summary> A character filter that replaces characters in the input string. It uses a regular expression to ident |
| | 13 | | public partial class PatternReplaceTokenFilter : TokenFilter |
| | 14 | | { |
| | 15 | | /// <summary> Initializes a new instance of PatternReplaceTokenFilter. </summary> |
| | 16 | | /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un |
| | 17 | | /// <param name="pattern"> A regular expression pattern. </param> |
| | 18 | | /// <param name="replacement"> The replacement text. </param> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="pattern"/>, or <paramref n |
| 0 | 20 | | public PatternReplaceTokenFilter(string name, string pattern, string replacement) : base(name) |
| | 21 | | { |
| 0 | 22 | | if (name == null) |
| | 23 | | { |
| 0 | 24 | | throw new ArgumentNullException(nameof(name)); |
| | 25 | | } |
| 0 | 26 | | if (pattern == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(pattern)); |
| | 29 | | } |
| 0 | 30 | | if (replacement == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(replacement)); |
| | 33 | | } |
| | 34 | |
|
| 0 | 35 | | Pattern = pattern; |
| 0 | 36 | | Replacement = replacement; |
| 0 | 37 | | ODataType = "#Microsoft.Azure.Search.PatternReplaceTokenFilter"; |
| 0 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Initializes a new instance of PatternReplaceTokenFilter. </summary> |
| | 41 | | /// <param name="oDataType"> Identifies the concrete type of the token filter. </param> |
| | 42 | | /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un |
| | 43 | | /// <param name="pattern"> A regular expression pattern. </param> |
| | 44 | | /// <param name="replacement"> The replacement text. </param> |
| 0 | 45 | | internal PatternReplaceTokenFilter(string oDataType, string name, string pattern, string replacement) : base(oDa |
| | 46 | | { |
| 0 | 47 | | Pattern = pattern; |
| 0 | 48 | | Replacement = replacement; |
| 0 | 49 | | ODataType = oDataType ?? "#Microsoft.Azure.Search.PatternReplaceTokenFilter"; |
| 0 | 50 | | } |
| | 51 | |
|
| | 52 | | /// <summary> A regular expression pattern. </summary> |
| 0 | 53 | | public string Pattern { get; set; } |
| | 54 | | /// <summary> The replacement text. </summary> |
| 0 | 55 | | public string Replacement { get; set; } |
| | 56 | | } |
| | 57 | | } |