"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthorizationProvider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Authorization Provider contract.
 *
 * Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-08-01.
 *
 * Other available API versions: 2022-04-01-preview, 2022-08-01, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview, 2024-10-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native apimanagement [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
 */
class AuthorizationProvider extends pulumi.CustomResource {
    /**
     * Get an existing AuthorizationProvider resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new AuthorizationProvider(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AuthorizationProvider.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === AuthorizationProvider.__pulumiType;
    }
    /**
     * Create a AuthorizationProvider resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.serviceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceName'");
            }
            resourceInputs["authorizationProviderId"] = args?.authorizationProviderId;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["identityProvider"] = args?.identityProvider;
            resourceInputs["oauth2"] = args?.oauth2;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["serviceName"] = args?.serviceName;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["displayName"] = undefined /*out*/;
            resourceInputs["identityProvider"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["oauth2"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:apimanagement/v20220401preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20220801:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20220901preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20230301preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20230501preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20230901preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20240501:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20240601preview:AuthorizationProvider" }, { type: "azure-native:apimanagement/v20241001preview:AuthorizationProvider" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(AuthorizationProvider.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AuthorizationProvider = AuthorizationProvider;
/** @internal */
AuthorizationProvider.__pulumiType = 'azure-native:apimanagement:AuthorizationProvider';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvblByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vYXBpbWFuYWdlbWVudC9hdXRob3JpemF0aW9uUHJvdmlkZXIudHMiXSwibmFtZXMiO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