// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Trigger of operation. */
public final class OperationTrigger extends ExpandableStringEnum<OperationTrigger> {
    /** Static value User for OperationTrigger. */
    public static final OperationTrigger USER = fromString("User");

    /** Static value Schedule for OperationTrigger. */
    public static final OperationTrigger SCHEDULE = fromString("Schedule");

    /** Static value IdleShutdown for OperationTrigger. */
    public static final OperationTrigger IDLE_SHUTDOWN = fromString("IdleShutdown");

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

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

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