| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Search.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Create tokens for phonetic matches. This token filter is implemented |
| | 18 | | /// using Apache Lucene. |
| | 19 | | /// <see |
| | 20 | | /// href="https://lucene.apache.org/core/4_10_3/analyzers-phonetic/org/apache/lucene/analysis/phonetic/package-tree. |
| | 21 | | /// /> |
| | 22 | | /// </summary> |
| | 23 | | [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.PhoneticTokenFilter")] |
| | 24 | | public partial class PhoneticTokenFilter : TokenFilter |
| | 25 | | { |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the PhoneticTokenFilter class. |
| | 28 | | /// </summary> |
| 26 | 29 | | public PhoneticTokenFilter() |
| | 30 | | { |
| | 31 | | CustomInit(); |
| 26 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Initializes a new instance of the PhoneticTokenFilter class. |
| | 36 | | /// </summary> |
| | 37 | | /// <param name="name">The name of the token filter. It must only |
| | 38 | | /// contain letters, digits, spaces, dashes or underscores, can only |
| | 39 | | /// start and end with alphanumeric characters, and is limited to 128 |
| | 40 | | /// characters.</param> |
| | 41 | | /// <param name="encoder">The phonetic encoder to use. Default is |
| | 42 | | /// "metaphone". Possible values include: 'metaphone', |
| | 43 | | /// 'doubleMetaphone', 'soundex', 'refinedSoundex', 'caverphone1', |
| | 44 | | /// 'caverphone2', 'cologne', 'nysiis', 'koelnerPhonetik', |
| | 45 | | /// 'haasePhonetik', 'beiderMorse'</param> |
| | 46 | | /// <param name="replaceOriginalTokens">A value indicating whether |
| | 47 | | /// encoded tokens should replace original tokens. If false, encoded |
| | 48 | | /// tokens are added as synonyms. Default is true.</param> |
| | 49 | | public PhoneticTokenFilter(string name, PhoneticEncoder? encoder = default(PhoneticEncoder?), bool? replaceOrigi |
| 28 | 50 | | : base(name) |
| | 51 | | { |
| 28 | 52 | | Encoder = encoder; |
| 28 | 53 | | ReplaceOriginalTokens = replaceOriginalTokens; |
| | 54 | | CustomInit(); |
| 28 | 55 | | } |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// An initialization method that performs custom operations like setting defaults |
| | 59 | | /// </summary> |
| | 60 | | partial void CustomInit(); |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Gets or sets the phonetic encoder to use. Default is "metaphone". |
| | 64 | | /// Possible values include: 'metaphone', 'doubleMetaphone', 'soundex', |
| | 65 | | /// 'refinedSoundex', 'caverphone1', 'caverphone2', 'cologne', |
| | 66 | | /// 'nysiis', 'koelnerPhonetik', 'haasePhonetik', 'beiderMorse' |
| | 67 | | /// </summary> |
| | 68 | | [JsonProperty(PropertyName = "encoder")] |
| 132 | 69 | | public PhoneticEncoder? Encoder { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Gets or sets a value indicating whether encoded tokens should |
| | 73 | | /// replace original tokens. If false, encoded tokens are added as |
| | 74 | | /// synonyms. Default is true. |
| | 75 | | /// </summary> |
| | 76 | | [JsonProperty(PropertyName = "replace")] |
| 132 | 77 | | public bool? ReplaceOriginalTokens { get; set; } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Validate the object. |
| | 81 | | /// </summary> |
| | 82 | | /// <exception cref="Rest.ValidationException"> |
| | 83 | | /// Thrown if validation fails |
| | 84 | | /// </exception> |
| | 85 | | public override void Validate() |
| | 86 | | { |
| 26 | 87 | | base.Validate(); |
| 26 | 88 | | } |
| | 89 | | } |
| | 90 | | } |