// 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.indexes.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/** A value indicating which split mode to perform. */
public final class TextSplitMode extends ExpandableStringEnum<TextSplitMode> {
    /** Split the text into individual pages. */
    public static final TextSplitMode PAGES = fromString("pages");

    /** Split the text into individual sentences. */
    public static final TextSplitMode SENTENCES = fromString("sentences");

    /**
     * Creates a new instance of TextSplitMode value.
     *
     * @deprecated Use the {@link #fromString(String)} factory method.
     */
    @Deprecated
    public TextSplitMode() {}

    /**
     * Creates or finds a TextSplitMode from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding TextSplitMode.
     */
    public static TextSplitMode fromString(String name) {
        return fromString(name, TextSplitMode.class);
    }

    /**
     * Gets known TextSplitMode values.
     *
     * @return known TextSplitMode values.
     */
    public static Collection<TextSplitMode> values() {
        return values(TextSplitMode.class);
    }
}
