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

package com.azure.health.insights.clinicalmatching.models;

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

/** Possible units for a person's age. */
public final class AgeUnit extends ExpandableStringEnum<AgeUnit> {
    /** Static value years for AgeUnit. */
    public static final AgeUnit YEARS = fromString("years");

    /** Static value months for AgeUnit. */
    public static final AgeUnit MONTHS = fromString("months");

    /** Static value days for AgeUnit. */
    public static final AgeUnit DAYS = fromString("days");

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

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

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