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

package com.azure.resourcemanager.redisenterprise.models;

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

/** State of the link between the database resources. */
public final class LinkState extends ExpandableStringEnum<LinkState> {
    /** Static value Linked for LinkState. */
    public static final LinkState LINKED = fromString("Linked");

    /** Static value Linking for LinkState. */
    public static final LinkState LINKING = fromString("Linking");

    /** Static value Unlinking for LinkState. */
    public static final LinkState UNLINKING = fromString("Unlinking");

    /** Static value LinkFailed for LinkState. */
    public static final LinkState LINK_FAILED = fromString("LinkFailed");

    /** Static value UnlinkFailed for LinkState. */
    public static final LinkState UNLINK_FAILED = fromString("UnlinkFailed");

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

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

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