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

package com.azure.resourcemanager.datafactory.models;

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

/**
 * The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for
 * key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string).
 */
public final class CosmosDbServicePrincipalCredentialType
    extends ExpandableStringEnum<CosmosDbServicePrincipalCredentialType> {
    /** Static value ServicePrincipalKey for CosmosDbServicePrincipalCredentialType. */
    public static final CosmosDbServicePrincipalCredentialType SERVICE_PRINCIPAL_KEY =
        fromString("ServicePrincipalKey");

    /** Static value ServicePrincipalCert for CosmosDbServicePrincipalCredentialType. */
    public static final CosmosDbServicePrincipalCredentialType SERVICE_PRINCIPAL_CERT =
        fromString("ServicePrincipalCert");

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

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

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