LengthTokenFilter.java

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

package com.azure.search.documents.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Removes words that are too long or too short. This token filter is
 * implemented using Apache Lucene.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata.type")
@JsonTypeName("#Microsoft.Azure.Search.LengthTokenFilter")
@Fluent
public final class LengthTokenFilter extends TokenFilter {
    /*
     * The minimum length in characters. Default is 0. Maximum is 300. Must be
     * less than the value of max.
     */
    @JsonProperty(value = "min")
    private Integer min;

    /*
     * The maximum length in characters. Default and maximum is 300.
     */
    @JsonProperty(value = "max")
    private Integer max;

    /**
     * Get the min property: The minimum length in characters. Default is 0.
     * Maximum is 300. Must be less than the value of max.
     *
     * @return the min value.
     */
    public Integer getMin() {
        return this.min;
    }

    /**
     * Set the min property: The minimum length in characters. Default is 0.
     * Maximum is 300. Must be less than the value of max.
     *
     * @param min the min value to set.
     * @return the LengthTokenFilter object itself.
     */
    public LengthTokenFilter setMin(Integer min) {
        this.min = min;
        return this;
    }

    /**
     * Get the max property: The maximum length in characters. Default and
     * maximum is 300.
     *
     * @return the max value.
     */
    public Integer getMax() {
        return this.max;
    }

    /**
     * Set the max property: The maximum length in characters. Default and
     * maximum is 300.
     *
     * @param max the max value to set.
     * @return the LengthTokenFilter object itself.
     */
    public LengthTokenFilter setMax(Integer max) {
        this.max = max;
        return this;
    }
}