"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.WidgetConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a WidgetConfig.
 *
 * To get more information about WidgetConfig, see:
 *
 * * [API documentation](https://cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.engines.widgetConfigs)
 *
 * ## Example Usage
 *
 * ### Discoveryengine Widgetconfig Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.discoveryengine.DataStore("basic", {
 *     location: "global",
 *     dataStoreId: "data-store-id",
 *     displayName: "tf-test-datastore",
 *     industryVertical: "GENERIC",
 *     contentConfig: "NO_CONTENT",
 *     solutionTypes: ["SOLUTION_TYPE_SEARCH"],
 *     createAdvancedSiteSearch: false,
 * });
 * const basicSearchEngine = new gcp.discoveryengine.SearchEngine("basic", {
 *     engineId: "engine-id",
 *     collectionId: "default_collection",
 *     location: basic.location,
 *     displayName: "tf-test-engine",
 *     dataStoreIds: [basic.dataStoreId],
 *     industryVertical: "GENERIC",
 *     appType: "APP_TYPE_INTRANET",
 *     searchEngineConfig: {},
 * });
 * const basicWidgetConfig = new gcp.discoveryengine.WidgetConfig("basic", {
 *     location: basicSearchEngine.location,
 *     engineId: basicSearchEngine.engineId,
 *     accessSettings: {
 *         enableWebApp: true,
 *         workforceIdentityPoolProvider: "locations/global/workforcePools/workforce-pool-id/providers/workforce-pool-provider",
 *     },
 *     uiSettings: {
 *         interactionType: "SEARCH_WITH_ANSWER",
 *         enableAutocomplete: true,
 *         enableQualityFeedback: true,
 *         generativeAnswerConfig: {
 *             resultCount: 5,
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * WidgetConfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/widgetConfigs/{{widget_config_id}}`
 *
 * * `{{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}`
 *
 * * `{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}`
 *
 * When using the `pulumi import` command, WidgetConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/widgetConfigs/{{widget_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default {{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}
 * ```
 */
class WidgetConfig extends pulumi.CustomResource {
    /**
     * Get an existing WidgetConfig 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 WidgetConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WidgetConfig.  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'] === WidgetConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessSettings"] = state?.accessSettings;
            resourceInputs["collectionId"] = state?.collectionId;
            resourceInputs["engineId"] = state?.engineId;
            resourceInputs["homepageSetting"] = state?.homepageSetting;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["uiBranding"] = state?.uiBranding;
            resourceInputs["uiSettings"] = state?.uiSettings;
            resourceInputs["widgetConfigId"] = state?.widgetConfigId;
        }
        else {
            const args = argsOrState;
            if (args?.engineId === undefined && !opts.urn) {
                throw new Error("Missing required property 'engineId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["accessSettings"] = args?.accessSettings;
            resourceInputs["collectionId"] = args?.collectionId;
            resourceInputs["engineId"] = args?.engineId;
            resourceInputs["homepageSetting"] = args?.homepageSetting;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["uiBranding"] = args?.uiBranding;
            resourceInputs["uiSettings"] = args?.uiSettings;
            resourceInputs["widgetConfigId"] = args?.widgetConfigId;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(WidgetConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WidgetConfig = WidgetConfig;
/** @internal */
WidgetConfig.__pulumiType = 'gcp:discoveryengine/widgetConfig:WidgetConfig';
//# sourceMappingURL=widgetConfig.js.map