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

package com.azure.resourcemanager.iothub.models;

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

/**
 * The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently
 * provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT
 * hub can failover to.
 */
public final class IotHubReplicaRoleType extends ExpandableStringEnum<IotHubReplicaRoleType> {
    /** Static value primary for IotHubReplicaRoleType. */
    public static final IotHubReplicaRoleType PRIMARY = fromString("primary");

    /** Static value secondary for IotHubReplicaRoleType. */
    public static final IotHubReplicaRoleType SECONDARY = fromString("secondary");

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

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

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