"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.TargetSite = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * TargetSite represents a URI pattern that the users want to confine their
 * search.
 *
 * To get more information about TargetSite, see:
 *
 * * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.siteSearchEngine.targetSites)
 *
 * ## Example Usage
 *
 * ### Discoveryengine Targetsite Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basicDataStore = new gcp.discoveryengine.DataStore("basic", {
 *     location: "global",
 *     dataStoreId: "data-store-id",
 *     displayName: "tf-test-basic-site-search-datastore",
 *     industryVertical: "GENERIC",
 *     contentConfig: "PUBLIC_WEBSITE",
 *     solutionTypes: ["SOLUTION_TYPE_SEARCH"],
 *     createAdvancedSiteSearch: false,
 *     skipDefaultSchemaCreation: false,
 * });
 * const basic = new gcp.discoveryengine.TargetSite("basic", {
 *     location: basicDataStore.location,
 *     dataStoreId: basicDataStore.dataStoreId,
 *     providedUriPattern: "cloud.google.com/docs/*",
 *     type: "INCLUDE",
 *     exactMatch: false,
 * });
 * ```
 * ### Discoveryengine Targetsite Advanced
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const advancedDataStore = new gcp.discoveryengine.DataStore("advanced", {
 *     location: "global",
 *     dataStoreId: "data-store-id",
 *     displayName: "tf-test-advanced-site-search-datastore",
 *     industryVertical: "GENERIC",
 *     contentConfig: "PUBLIC_WEBSITE",
 *     solutionTypes: ["SOLUTION_TYPE_SEARCH"],
 *     createAdvancedSiteSearch: true,
 *     skipDefaultSchemaCreation: false,
 * });
 * const advanced = new gcp.discoveryengine.TargetSite("advanced", {
 *     location: advancedDataStore.location,
 *     dataStoreId: advancedDataStore.dataStoreId,
 *     providedUriPattern: "cloud.google.com/docs/*",
 *     type: "INCLUDE",
 *     exactMatch: false,
 * });
 * ```
 *
 * ## Import
 *
 * TargetSite can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/siteSearchEngine/targetSites/{{target_site_id}}`
 *
 * * `{{project}}/{{location}}/{{data_store_id}}/{{target_site_id}}`
 *
 * * `{{location}}/{{data_store_id}}/{{target_site_id}}`
 *
 * When using the `pulumi import` command, TargetSite can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/targetSite:TargetSite default projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/siteSearchEngine/targetSites/{{target_site_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/targetSite:TargetSite default {{project}}/{{location}}/{{data_store_id}}/{{target_site_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/targetSite:TargetSite default {{location}}/{{data_store_id}}/{{target_site_id}}
 * ```
 */
class TargetSite extends pulumi.CustomResource {
    /**
     * Get an existing TargetSite 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 TargetSite(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of TargetSite.  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'] === TargetSite.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["dataStoreId"] = state?.dataStoreId;
            resourceInputs["exactMatch"] = state?.exactMatch;
            resourceInputs["failureReasons"] = state?.failureReasons;
            resourceInputs["generatedUriPattern"] = state?.generatedUriPattern;
            resourceInputs["indexingStatus"] = state?.indexingStatus;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["providedUriPattern"] = state?.providedUriPattern;
            resourceInputs["rootDomainUri"] = state?.rootDomainUri;
            resourceInputs["siteVerificationInfos"] = state?.siteVerificationInfos;
            resourceInputs["targetSiteId"] = state?.targetSiteId;
            resourceInputs["type"] = state?.type;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.dataStoreId === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataStoreId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.providedUriPattern === undefined && !opts.urn) {
                throw new Error("Missing required property 'providedUriPattern'");
            }
            resourceInputs["dataStoreId"] = args?.dataStoreId;
            resourceInputs["exactMatch"] = args?.exactMatch;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["providedUriPattern"] = args?.providedUriPattern;
            resourceInputs["type"] = args?.type;
            resourceInputs["failureReasons"] = undefined /*out*/;
            resourceInputs["generatedUriPattern"] = undefined /*out*/;
            resourceInputs["indexingStatus"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["rootDomainUri"] = undefined /*out*/;
            resourceInputs["siteVerificationInfos"] = undefined /*out*/;
            resourceInputs["targetSiteId"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(TargetSite.__pulumiType, name, resourceInputs, opts);
    }
}
exports.TargetSite = TargetSite;
/** @internal */
TargetSite.__pulumiType = 'gcp:discoveryengine/targetSite:TargetSite';
//# sourceMappingURL=targetSite.js.map