// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
// 
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Search.Models
{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Microsoft.Rest.Azure;

    /// <summary>
    /// Converts alphabetic, numeric, and symbolic Unicode characters which
    /// are not in the first 127 ASCII characters (the "Basic Latin" Unicode
    /// block) into their ASCII equivalents, if such equivalents exist. This
    /// token filter is implemented using Apache Lucene.
    /// <see href="http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html" />
    /// </summary>
    [JsonObject("#Microsoft.Azure.Search.AsciiFoldingTokenFilter")]
    public partial class AsciiFoldingTokenFilter : TokenFilter
    {
        /// <summary>
        /// Initializes a new instance of the AsciiFoldingTokenFilter class.
        /// </summary>
        public AsciiFoldingTokenFilter() { }

        /// <summary>
        /// Initializes a new instance of the AsciiFoldingTokenFilter class.
        /// </summary>
        public AsciiFoldingTokenFilter(string name, bool? preserveOriginal = default(bool?))
            : base(name)
        {
            PreserveOriginal = preserveOriginal;
        }

        /// <summary>
        /// Gets or sets a value indicating whether the original token will be
        /// kept. Default is false.
        /// </summary>
        [JsonProperty(PropertyName = "preserveOriginal")]
        public bool? PreserveOriginal { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public override void Validate()
        {
            base.Validate();
        }
    }
}
