"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.Gallery = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Dev Center Gallery.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const testUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("test", {
 *     name: "example-uai",
 *     location: testAzurermResourceGroup.location,
 *     resourceGroupName: testAzurermResourceGroup.name,
 * });
 * const test = new azure.devcenter.DevCenter("test", {
 *     name: "example-devcenter",
 *     resourceGroupName: testAzurermResourceGroup.name,
 *     location: testAzurermResourceGroup.location,
 *     identity: {
 *         type: "UserAssigned",
 *         identityIds: [testUserAssignedIdentity.id],
 *     },
 * });
 * const exampleSharedImageGallery = new azure.compute.SharedImageGallery("example", {
 *     name: "example-image-gallery",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleGallery = new azure.devcenter.Gallery("example", {
 *     devCenterId: exampleAzurermDevCenter.id,
 *     sharedGalleryId: exampleSharedImageGallery.id,
 *     name: "example",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.DevCenter` - 2025-02-01
 *
 * ## Import
 *
 * An existing Dev Center Gallery can be imported into Pulumi using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:devcenter/gallery:Gallery example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devCenters/{devCenterName}/galleries/{galleryName}
 * ```
 *
 * * Where `{subscriptionId}` is the ID of the Azure Subscription where the Dev Center Gallery exists. For example `12345678-1234-9876-4563-123456789012`.
 * * Where `{resourceGroupName}` is the name of Resource Group where this Dev Center Gallery exists. For example `example-resource-group`.
 * * Where `{devCenterName}` is the name of the Dev Center. For example `devCenterValue`.
 * * Where `{galleryName}` is the name of the Gallery. For example `galleryValue`.
 */
class Gallery extends pulumi.CustomResource {
    /**
     * Get an existing Gallery 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 Gallery(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:devcenter/gallery:Gallery';
    /**
     * Returns true if the given object is an instance of Gallery.  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'] === Gallery.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["devCenterId"] = state?.devCenterId;
            resourceInputs["name"] = state?.name;
            resourceInputs["sharedGalleryId"] = state?.sharedGalleryId;
        }
        else {
            const args = argsOrState;
            if (args?.devCenterId === undefined && !opts.urn) {
                throw new Error("Missing required property 'devCenterId'");
            }
            if (args?.sharedGalleryId === undefined && !opts.urn) {
                throw new Error("Missing required property 'sharedGalleryId'");
            }
            resourceInputs["devCenterId"] = args?.devCenterId;
            resourceInputs["name"] = args?.name;
            resourceInputs["sharedGalleryId"] = args?.sharedGalleryId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Gallery.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Gallery = Gallery;
//# sourceMappingURL=gallery.js.map