// 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;

/** Defines supported metric goals for hyperparameter tuning. */
public final class Goal extends ExpandableStringEnum<Goal> {
    /** Static value Minimize for Goal. */
    public static final Goal MINIMIZE = fromString("Minimize");

    /** Static value Maximize for Goal. */
    public static final Goal MAXIMIZE = fromString("Maximize");

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

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

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