"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.UserStore = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a user store.
 *
 * To get more information about UserStore, see:
 *
 * * [API documentation](https://cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.userStores)
 *
 * ## Example Usage
 *
 * ### Discoveryengine Userstore Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.discoveryengine.LicenseConfig("basic", {
 *     location: "us",
 *     licenseConfigId: "license-config-id",
 *     licenseCount: 50,
 *     subscriptionTier: "SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT",
 *     startDate: {
 *         year: 2099,
 *         month: 1,
 *         day: 1,
 *     },
 *     endDate: {
 *         year: 2100,
 *         month: 1,
 *         day: 1,
 *     },
 *     subscriptionTerm: "SUBSCRIPTION_TERM_ONE_YEAR",
 * });
 * const project = gcp.organizations.getProject({});
 * const basicUserStore = new gcp.discoveryengine.UserStore("basic", {
 *     location: basic.location,
 *     defaultLicenseConfig: pulumi.all([project, basic.location, basic.licenseConfigId]).apply(([project, location, licenseConfigId]) => `projects/${project.number}/locations/${location}/licenseConfigs/${licenseConfigId}`),
 *     enableLicenseAutoRegister: true,
 * });
 * ```
 *
 * ## Import
 *
 * UserStore can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/userStores/{{user_store_id}}`
 *
 * * `{{project}}/{{location}}/{{user_store_id}}`
 *
 * * `{{location}}/{{user_store_id}}`
 *
 * When using the `pulumi import` command, UserStore can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/userStore:UserStore default projects/{{project}}/locations/{{location}}/userStores/{{user_store_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/userStore:UserStore default {{project}}/{{location}}/{{user_store_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/userStore:UserStore default {{location}}/{{user_store_id}}
 * ```
 */
class UserStore extends pulumi.CustomResource {
    /**
     * Get an existing UserStore 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 UserStore(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of UserStore.  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'] === UserStore.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["defaultLicenseConfig"] = state?.defaultLicenseConfig;
            resourceInputs["enableExpiredLicenseAutoUpdate"] = state?.enableExpiredLicenseAutoUpdate;
            resourceInputs["enableLicenseAutoRegister"] = state?.enableLicenseAutoRegister;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["userStoreId"] = state?.userStoreId;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["defaultLicenseConfig"] = args?.defaultLicenseConfig;
            resourceInputs["enableExpiredLicenseAutoUpdate"] = args?.enableExpiredLicenseAutoUpdate;
            resourceInputs["enableLicenseAutoRegister"] = args?.enableLicenseAutoRegister;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["userStoreId"] = args?.userStoreId;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(UserStore.__pulumiType, name, resourceInputs, opts);
    }
}
exports.UserStore = UserStore;
/** @internal */
UserStore.__pulumiType = 'gcp:discoveryengine/userStore:UserStore';
//# sourceMappingURL=userStore.js.map