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

package com.azure.resourcemanager.cosmosdbforpostgresql.models;

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

/** The role of a server. */
public final class ServerRole extends ExpandableStringEnum<ServerRole> {
    /** Static value Coordinator for ServerRole. */
    public static final ServerRole COORDINATOR = fromString("Coordinator");

    /** Static value Worker for ServerRole. */
    public static final ServerRole WORKER = fromString("Worker");

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

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

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