"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Server = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an Analysis Services Server.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "analysis-services-server-test",
 *     location: "West Europe",
 * });
 * const server = new azure.analysisservices.Server("server", {
 *     name: "analysisservicesserver",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "S0",
 *     adminUsers: ["myuser@domain.tld"],
 *     powerBiServiceEnabled: true,
 *     ipv4FirewallRules: [{
 *         name: "myRule1",
 *         rangeStart: "210.117.252.0",
 *         rangeEnd: "210.117.252.255",
 *     }],
 *     tags: {
 *         abc: "123",
 *     },
 * });
 * ```
 *
 * > **Note:** The server resource will automatically be started and stopped during an update if it is in `paused` state.
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.AnalysisServices` - 2017-08-01
 *
 * ## Import
 *
 * Analysis Services Server can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:analysisservices/server:Server server /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AnalysisServices/servers/server1
 * ```
 */
class Server extends pulumi.CustomResource {
    /**
     * Get an existing Server 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 state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new Server(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:analysisservices/server:Server';
    /**
     * Returns true if the given object is an instance of Server.  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'] === Server.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminUsers"] = state?.adminUsers;
            resourceInputs["backupBlobContainerUri"] = state?.backupBlobContainerUri;
            resourceInputs["ipv4FirewallRules"] = state?.ipv4FirewallRules;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["powerBiServiceEnabled"] = state?.powerBiServiceEnabled;
            resourceInputs["querypoolConnectionMode"] = state?.querypoolConnectionMode;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["serverFullName"] = state?.serverFullName;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.sku === undefined && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            resourceInputs["adminUsers"] = args?.adminUsers;
            resourceInputs["backupBlobContainerUri"] = args?.backupBlobContainerUri ? pulumi.secret(args.backupBlobContainerUri) : undefined;
            resourceInputs["ipv4FirewallRules"] = args?.ipv4FirewallRules;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["powerBiServiceEnabled"] = args?.powerBiServiceEnabled;
            resourceInputs["querypoolConnectionMode"] = args?.querypoolConnectionMode;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["serverFullName"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["backupBlobContainerUri"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Server.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Server = Server;
//# sourceMappingURL=server.js.map