| | 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.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Flexibly separates text into terms via a regular expression pattern. |
| | 20 | | /// This analyzer is implemented using Apache Lucene. |
| | 21 | | /// <see |
| | 22 | | /// href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/PatternAnal |
| | 23 | | /// /> |
| | 24 | | /// </summary> |
| | 25 | | [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.PatternAnalyzer")] |
| | 26 | | public partial class PatternAnalyzer : Analyzer |
| | 27 | | { |
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the PatternAnalyzer class. |
| | 30 | | /// </summary> |
| 20 | 31 | | public PatternAnalyzer() |
| | 32 | | { |
| | 33 | | CustomInit(); |
| 20 | 34 | | } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// Initializes a new instance of the PatternAnalyzer class. |
| | 38 | | /// </summary> |
| | 39 | | /// <param name="name">The name of the analyzer. It must only contain |
| | 40 | | /// letters, digits, spaces, dashes or underscores, can only start and |
| | 41 | | /// end with alphanumeric characters, and is limited to 128 |
| | 42 | | /// characters.</param> |
| | 43 | | /// <param name="lowerCaseTerms">A value indicating whether terms |
| | 44 | | /// should be lower-cased. Default is true.</param> |
| | 45 | | /// <param name="pattern">A regular expression pattern to match token |
| | 46 | | /// separators. Default is an expression that matches one or more |
| | 47 | | /// whitespace characters.</param> |
| | 48 | | /// <param name="flags">Regular expression flags. Possible values |
| | 49 | | /// include: 'CANON_EQ', 'CASE_INSENSITIVE', 'COMMENTS', 'DOTALL', |
| | 50 | | /// 'LITERAL', 'MULTILINE', 'UNICODE_CASE', 'UNIX_LINES'</param> |
| | 51 | | /// <param name="stopwords">A list of stopwords.</param> |
| | 52 | | public PatternAnalyzer(string name, bool? lowerCaseTerms = default(bool?), string pattern = default(string), Reg |
| 22 | 53 | | : base(name) |
| | 54 | | { |
| 22 | 55 | | LowerCaseTerms = lowerCaseTerms; |
| 22 | 56 | | Pattern = pattern; |
| 22 | 57 | | Flags = flags; |
| 22 | 58 | | Stopwords = stopwords; |
| | 59 | | CustomInit(); |
| 22 | 60 | | } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// An initialization method that performs custom operations like setting defaults |
| | 64 | | /// </summary> |
| | 65 | | partial void CustomInit(); |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets a value indicating whether terms should be |
| | 69 | | /// lower-cased. Default is true. |
| | 70 | | /// </summary> |
| | 71 | | [JsonProperty(PropertyName = "lowercase")] |
| 102 | 72 | | public bool? LowerCaseTerms { get; set; } |
| | 73 | |
|
| | 74 | | /// <summary> |
| | 75 | | /// Gets or sets a regular expression pattern to match token |
| | 76 | | /// separators. Default is an expression that matches one or more |
| | 77 | | /// whitespace characters. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "pattern")] |
| 102 | 80 | | public string Pattern { get; set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets regular expression flags. Possible values include: |
| | 84 | | /// 'CANON_EQ', 'CASE_INSENSITIVE', 'COMMENTS', 'DOTALL', 'LITERAL', |
| | 85 | | /// 'MULTILINE', 'UNICODE_CASE', 'UNIX_LINES' |
| | 86 | | /// </summary> |
| | 87 | | [JsonProperty(PropertyName = "flags")] |
| 102 | 88 | | public RegexFlags? Flags { get; set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets or sets a list of stopwords. |
| | 92 | | /// </summary> |
| | 93 | | [JsonProperty(PropertyName = "stopwords")] |
| 102 | 94 | | public IList<string> Stopwords { get; set; } |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Validate the object. |
| | 98 | | /// </summary> |
| | 99 | | /// <exception cref="Rest.ValidationException"> |
| | 100 | | /// Thrown if validation fails |
| | 101 | | /// </exception> |
| | 102 | | public override void Validate() |
| | 103 | | { |
| 20 | 104 | | base.Validate(); |
| 20 | 105 | | } |
| | 106 | | } |
| | 107 | | } |