"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.Assistant = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Assistant
 *
 * To get more information about Assistant, see:
 *
 * * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#assistantservice)
 *
 * ## Example Usage
 *
 * ### Discoveryengine Assistant Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.discoveryengine.DataStore("basic", {
 *     location: "global",
 *     dataStoreId: "example-data-store-id",
 *     displayName: "tf-test-structured-datastore",
 *     industryVertical: "GENERIC",
 *     contentConfig: "NO_CONTENT",
 *     solutionTypes: ["SOLUTION_TYPE_SEARCH"],
 *     createAdvancedSiteSearch: false,
 * });
 * const basicSearchEngine = new gcp.discoveryengine.SearchEngine("basic", {
 *     location: "global",
 *     collectionId: "default_collection",
 *     engineId: "example-engine-id",
 *     displayName: "Example Display Name",
 *     dataStoreIds: [basic.dataStoreId],
 *     searchEngineConfig: {},
 * });
 * const basicAssistant = new gcp.discoveryengine.Assistant("basic", {
 *     location: "global",
 *     collectionId: "default_collection",
 *     engineId: basicSearchEngine.engineId,
 *     assistantId: "default_assistant",
 *     displayName: "updated-tf-test-Assistant",
 *     description: "Assistant Description",
 *     generationConfig: {
 *         systemInstruction: {
 *             additionalSystemInstruction: "foobar",
 *         },
 *         defaultLanguage: "en",
 *     },
 *     customerPolicy: {
 *         bannedPhrases: [{
 *             phrase: "foo",
 *             matchType: "SIMPLE_STRING_MATCH",
 *             ignoreDiacritics: false,
 *         }],
 *     },
 *     webGroundingType: "WEB_GROUNDING_TYPE_GOOGLE_SEARCH",
 * });
 * ```
 *
 * ## Import
 *
 * Assistant can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/assistants/{{assistant_id}}`
 *
 * * `{{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}`
 *
 * * `{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}`
 *
 * When using the `pulumi import` command, Assistant can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/assistant:Assistant default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/assistants/{{assistant_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/assistant:Assistant default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/assistant:Assistant default {{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}
 * ```
 */
class Assistant extends pulumi.CustomResource {
    /**
     * Get an existing Assistant 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 Assistant(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Assistant.  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'] === Assistant.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["assistantId"] = state?.assistantId;
            resourceInputs["collectionId"] = state?.collectionId;
            resourceInputs["customerPolicy"] = state?.customerPolicy;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["engineId"] = state?.engineId;
            resourceInputs["generationConfig"] = state?.generationConfig;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["webGroundingType"] = state?.webGroundingType;
        }
        else {
            const args = argsOrState;
            if (args?.assistantId === undefined && !opts.urn) {
                throw new Error("Missing required property 'assistantId'");
            }
            if (args?.collectionId === undefined && !opts.urn) {
                throw new Error("Missing required property 'collectionId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            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["assistantId"] = args?.assistantId;
            resourceInputs["collectionId"] = args?.collectionId;
            resourceInputs["customerPolicy"] = args?.customerPolicy;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["engineId"] = args?.engineId;
            resourceInputs["generationConfig"] = args?.generationConfig;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["webGroundingType"] = args?.webGroundingType;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Assistant.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Assistant = Assistant;
/** @internal */
Assistant.__pulumiType = 'gcp:discoveryengine/assistant:Assistant';
//# sourceMappingURL=assistant.js.map