"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Provider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
 * The provider type for the volcengine package. By default, resources use package-wide configuration
 * settings, however an explicit `Provider` instance may be created and passed during resource
 * construction to achieve fine-grained programmatic control over provider settings. See the
 * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
 */
class Provider extends pulumi.ProviderResource {
    /**
     * Returns true if the given object is an instance of Provider.  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'] === "pulumi:providers:" + Provider.__pulumiType;
    }
    /**
     * Create a Provider 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) {
        var _a, _b, _c, _d;
        let resourceInputs = {};
        opts = opts || {};
        {
            resourceInputs["accessKey"] = (_a = (args ? args.accessKey : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnv("VOLCENGINE_ACCESS_KEY");
            resourceInputs["assumeRole"] = pulumi.output(args ? args.assumeRole : undefined).apply(JSON.stringify);
            resourceInputs["assumeRoleWithOidc"] = pulumi.output(args ? args.assumeRoleWithOidc : undefined).apply(JSON.stringify);
            resourceInputs["customerEndpointSuffix"] = args ? args.customerEndpointSuffix : undefined;
            resourceInputs["customerEndpoints"] = args ? args.customerEndpoints : undefined;
            resourceInputs["customerHeaders"] = args ? args.customerHeaders : undefined;
            resourceInputs["disableSsl"] = pulumi.output(args ? args.disableSsl : undefined).apply(JSON.stringify);
            resourceInputs["enableStandardEndpoint"] = pulumi.output(args ? args.enableStandardEndpoint : undefined).apply(JSON.stringify);
            resourceInputs["endpoint"] = (_b = (args ? args.endpoint : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("VOLCENGINE_ENDPOINT");
            resourceInputs["proxyUrl"] = args ? args.proxyUrl : undefined;
            resourceInputs["region"] = (_c = (args ? args.region : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("VOLCENGINE_REGION");
            resourceInputs["secretKey"] = (_d = (args ? args.secretKey : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("VOLCENGINE_SECRET_KEY");
            resourceInputs["sessionToken"] = args ? args.sessionToken : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Provider.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Provider = Provider;
/** @internal */
Provider.__pulumiType = 'volcengine';
//# sourceMappingURL=provider.js.map