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

package com.azure.resourcemanager.postgresqlflexibleserver.models;

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

/** Migration name availability reason. */
public final class MigrationNameAvailabilityReason extends ExpandableStringEnum<MigrationNameAvailabilityReason> {
    /** Static value Invalid for MigrationNameAvailabilityReason. */
    public static final MigrationNameAvailabilityReason INVALID = fromString("Invalid");

    /** Static value AlreadyExists for MigrationNameAvailabilityReason. */
    public static final MigrationNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists");

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

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

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