// 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.util.ExpandableStringEnum;
import java.util.Collection;

/** Reason that a partial response was returned for a semantic search request. */
public final class SemanticPartialResponseReason extends ExpandableStringEnum<SemanticPartialResponseReason> {
    /**
     * If 'semanticMaxWaitInMilliseconds' was set and the semantic processing duration exceeded that value. Only the
     * base results were returned.
     */
    public static final SemanticPartialResponseReason MAX_WAIT_EXCEEDED = fromString("maxWaitExceeded");

    /** The request was throttled. Only the base results were returned. */
    public static final SemanticPartialResponseReason CAPACITY_OVERLOADED = fromString("capacityOverloaded");

    /** At least one step of the semantic process failed. */
    public static final SemanticPartialResponseReason TRANSIENT = fromString("transient");

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

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

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