| | | 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> Truncates the terms to a specific length. This token filter is implemented using Apache Lucene. </summ |
| | | 13 | | public partial class TruncateTokenFilter : TokenFilter |
| | | 14 | | { |
| | | 15 | | /// <summary> Initializes a new instance of TruncateTokenFilter. </summary> |
| | | 16 | | /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un |
| | | 17 | | /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception> |
| | 0 | 18 | | public TruncateTokenFilter(string name) : base(name) |
| | | 19 | | { |
| | 0 | 20 | | if (name == null) |
| | | 21 | | { |
| | 0 | 22 | | throw new ArgumentNullException(nameof(name)); |
| | | 23 | | } |
| | | 24 | | |
| | 0 | 25 | | ODataType = "#Microsoft.Azure.Search.TruncateTokenFilter"; |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> Initializes a new instance of TruncateTokenFilter. </summary> |
| | | 29 | | /// <param name="oDataType"> Identifies the concrete type of the token filter. </param> |
| | | 30 | | /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un |
| | | 31 | | /// <param name="length"> The length at which terms will be truncated. Default and maximum is 300. </param> |
| | 0 | 32 | | internal TruncateTokenFilter(string oDataType, string name, int? length) : base(oDataType, name) |
| | | 33 | | { |
| | 0 | 34 | | Length = length; |
| | 0 | 35 | | ODataType = oDataType ?? "#Microsoft.Azure.Search.TruncateTokenFilter"; |
| | 0 | 36 | | } |
| | | 37 | | |
| | | 38 | | /// <summary> The length at which terms will be truncated. Default and maximum is 300. </summary> |
| | 0 | 39 | | public int? Length { get; set; } |
| | | 40 | | } |
| | | 41 | | } |