"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.RecommendationEngine = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Vertex AI Search recommendation apps.
 *
 * To get more information about RecommendationEngine, see:
 *
 * * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines)
 * * How-to Guides
 *     * [Create a Recommendation Engine](https://cloud.google.com/generative-ai-app-builder/docs/create-generic-recommendations-app)
 *
 * ## Example Usage
 *
 * ### Discoveryengine Recommendationengine Generic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const generic = new gcp.discoveryengine.DataStore("generic", {
 *     location: "global",
 *     dataStoreId: "recommendation-datastore-id",
 *     displayName: "tf-test-structured-datastore",
 *     industryVertical: "GENERIC",
 *     contentConfig: "NO_CONTENT",
 *     solutionTypes: ["SOLUTION_TYPE_RECOMMENDATION"],
 *     createAdvancedSiteSearch: false,
 *     skipDefaultSchemaCreation: false,
 * });
 * const genericRecommendationEngine = new gcp.discoveryengine.RecommendationEngine("generic", {
 *     engineId: "recommendation-engine-id",
 *     location: generic.location,
 *     displayName: "Example Recommendation Engine",
 *     dataStoreIds: [generic.dataStoreId],
 *     industryVertical: "GENERIC",
 *     commonConfig: {
 *         companyName: "test-company",
 *     },
 * });
 * ```
 * ### Discoveryengine Recommendationengine Media
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const media = new gcp.discoveryengine.DataStore("media", {
 *     location: "global",
 *     dataStoreId: "recommendation-datastore-id",
 *     displayName: "tf-test-structured-datastore",
 *     industryVertical: "MEDIA",
 *     contentConfig: "NO_CONTENT",
 *     solutionTypes: ["SOLUTION_TYPE_RECOMMENDATION"],
 *     createAdvancedSiteSearch: false,
 *     skipDefaultSchemaCreation: false,
 * });
 * const mediaRecommendationEngine = new gcp.discoveryengine.RecommendationEngine("media", {
 *     engineId: "recommendation-engine-id",
 *     location: media.location,
 *     displayName: "Example Media Recommendation Engine",
 *     dataStoreIds: [media.dataStoreId],
 *     industryVertical: "MEDIA",
 *     mediaRecommendationEngineConfig: {
 *         type: "recommended-for-you",
 *         optimizationObjective: "ctr",
 *         trainingState: "PAUSED",
 *         engineFeaturesConfig: {
 *             recommendedForYouConfig: {
 *                 contextEventType: "generic",
 *             },
 *         },
 *     },
 *     commonConfig: {
 *         companyName: "test-company",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * RecommendationEngine can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/collections/default_collection/engines/{{engine_id}}`
 *
 * * `{{project}}/{{location}}/{{engine_id}}`
 *
 * * `{{location}}/{{engine_id}}`
 *
 * When using the `pulumi import` command, RecommendationEngine can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/recommendationEngine:RecommendationEngine default projects/{{project}}/locations/{{location}}/collections/default_collection/engines/{{engine_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/recommendationEngine:RecommendationEngine default {{project}}/{{location}}/{{engine_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:discoveryengine/recommendationEngine:RecommendationEngine default {{location}}/{{engine_id}}
 * ```
 */
class RecommendationEngine extends pulumi.CustomResource {
    /**
     * Get an existing RecommendationEngine 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 RecommendationEngine(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of RecommendationEngine.  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'] === RecommendationEngine.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["commonConfig"] = state?.commonConfig;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["dataStoreIds"] = state?.dataStoreIds;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["engineId"] = state?.engineId;
            resourceInputs["industryVertical"] = state?.industryVertical;
            resourceInputs["location"] = state?.location;
            resourceInputs["mediaRecommendationEngineConfig"] = state?.mediaRecommendationEngineConfig;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.dataStoreIds === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataStoreIds'");
            }
            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["commonConfig"] = args?.commonConfig;
            resourceInputs["dataStoreIds"] = args?.dataStoreIds;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["engineId"] = args?.engineId;
            resourceInputs["industryVertical"] = args?.industryVertical;
            resourceInputs["location"] = args?.location;
            resourceInputs["mediaRecommendationEngineConfig"] = args?.mediaRecommendationEngineConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RecommendationEngine.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RecommendationEngine = RecommendationEngine;
/** @internal */
RecommendationEngine.__pulumiType = 'gcp:discoveryengine/recommendationEngine:RecommendationEngine';
//# sourceMappingURL=recommendationEngine.js.map