"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.AiReasoningEngine = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ReasoningEngine provides a customizable runtime for models to determine which actions to take and in which order.
 *
 * To get more information about ReasoningEngine, see:
 *
 * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.reasoningEngines/)
 * * How-to Guides
 *     * [Develop and deploy agents on Vertex AI Agent Engine](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/quickstart)
 *
 * ## Example Usage
 *
 * ### Vertex Ai Reasoning Engine Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumiverse/time";
 *
 * const classMethods = [{
 *     apiMode: "async",
 *     description: null,
 *     name: "async_query",
 *     parameters: {
 *         type: "object",
 *         required: [],
 *         properties: {},
 *     },
 * }];
 * const secret = new gcp.secretmanager.Secret("secret", {
 *     secretId: "secret",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", {
 *     secret: secret.id,
 *     secretData: "test",
 * });
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {accountId: "sa"});
 * const secretAccess = new gcp.secretmanager.SecretIamMember("secret_access", {
 *     secretId: secret.id,
 *     role: "roles/secretmanager.secretAccessor",
 *     member: serviceAccount.member,
 * });
 * const project = gcp.organizations.getProject({});
 * const saIamObjectViewer = new gcp.projects.IAMMember("sa_iam_object_viewer", {
 *     role: "roles/storage.objectViewer",
 *     project: project.then(project => project.id),
 *     member: serviceAccount.member,
 * });
 * const saIamAiPlatformUser = new gcp.projects.IAMMember("sa_iam_ai_platform_user", {
 *     role: "roles/aiplatform.user",
 *     project: project.then(project => project.id),
 *     member: serviceAccount.member,
 * });
 * const saIamViewer = new gcp.projects.IAMMember("sa_iam_viewer", {
 *     role: "roles/viewer",
 *     project: project.then(project => project.id),
 *     member: serviceAccount.member,
 * });
 * // Ensure we wait enough time for IAM permissions to be propagated
 * const wait5Minutes = new time.Sleep("wait_5_minutes", {createDuration: "5m"}, {
 *     dependsOn: [
 *         saIamAiPlatformUser,
 *         saIamObjectViewer,
 *         saIamViewer,
 *         secretAccess,
 *         secretVersion,
 *     ],
 * });
 * const bucket = new gcp.storage.Bucket("bucket", {
 *     name: "reasoning-engine",
 *     location: "us-central1",
 *     uniformBucketLevelAccess: true,
 *     forceDestroy: true,
 * });
 * const bucketObjRequirementsTxt = new gcp.storage.BucketObject("bucket_obj_requirements_txt", {
 *     name: "requirements.txt",
 *     bucket: bucket.id,
 *     source: new pulumi.asset.FileAsset("./test-fixtures/requirements_adk.txt"),
 * });
 * const bucketObjPickle = new gcp.storage.BucketObject("bucket_obj_pickle", {
 *     name: "code.pkl",
 *     bucket: bucket.id,
 *     source: new pulumi.asset.FileAsset("./test-fixtures/pickle_adk.pkl"),
 * });
 * const bucketObjDependenciesTarGz = new gcp.storage.BucketObject("bucket_obj_dependencies_tar_gz", {
 *     name: "dependencies.tar.gz",
 *     bucket: bucket.id,
 *     source: new pulumi.asset.FileAsset("./test-fixtures/dependencies_adk.tar.gz"),
 * });
 * const reasoningEngine = new gcp.vertex.AiReasoningEngine("reasoning_engine", {
 *     displayName: "reasoning-engine",
 *     description: "A basic reasoning engine",
 *     region: "us-central1",
 *     encryptionSpec: {
 *         kmsKeyName: "example-key",
 *     },
 *     spec: {
 *         agentFramework: "google-adk",
 *         classMethods: JSON.stringify(classMethods),
 *         serviceAccount: serviceAccount.email,
 *         deploymentSpec: {
 *             envs: [
 *                 {
 *                     name: "var_1",
 *                     value: "value_2",
 *                 },
 *                 {
 *                     name: "var_2",
 *                     value: "value_2",
 *                 },
 *             ],
 *             secretEnvs: [
 *                 {
 *                     name: "secret_var_1",
 *                     secretRef: {
 *                         secret: secret.secretId,
 *                         version: "latest",
 *                     },
 *                 },
 *                 {
 *                     name: "secret_var_2",
 *                     secretRef: {
 *                         secret: secret.secretId,
 *                         version: "latest",
 *                     },
 *                 },
 *             ],
 *         },
 *         packageSpec: {
 *             dependencyFilesGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjDependenciesTarGz.name}`,
 *             pickleObjectGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjPickle.name}`,
 *             pythonVersion: "3.11",
 *             requirementsGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjRequirementsTxt.name}`,
 *         },
 *     },
 * }, {
 *     dependsOn: [wait5Minutes],
 * });
 * ```
 *
 * ## Import
 *
 * ReasoningEngine can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/reasoningEngines/{{name}}`
 *
 * * `{{project}}/{{region}}/{{name}}`
 *
 * * `{{region}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, ReasoningEngine can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default projects/{{project}}/locations/{{region}}/reasoningEngines/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{project}}/{{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{name}}
 * ```
 */
class AiReasoningEngine extends pulumi.CustomResource {
    /**
     * Get an existing AiReasoningEngine 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 AiReasoningEngine(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiReasoningEngine.  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'] === AiReasoningEngine.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["encryptionSpec"] = state?.encryptionSpec;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["region"] = state?.region;
            resourceInputs["spec"] = state?.spec;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["encryptionSpec"] = args?.encryptionSpec;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["spec"] = args?.spec;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AiReasoningEngine.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiReasoningEngine = AiReasoningEngine;
/** @internal */
AiReasoningEngine.__pulumiType = 'gcp:vertex/aiReasoningEngine:AiReasoningEngine';
//# sourceMappingURL=aiReasoningEngine.js.map