"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.App = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Description
 *
 * ## Example Usage
 *
 * ### Ces App Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 *
 * const project = gcp.organizations.getProject({});
 * const fakePrivateKeySecret = new gcp.secretmanager.Secret("fake_private_key_secret", {
 *     secretId: "fake-pk-secret-app-tf1",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const fakeSecretVersion = new gcp.secretmanager.SecretVersion("fake_secret_version", {
 *     secret: fakePrivateKeySecret.id,
 *     secretData: std.file({
 *         input: "test-fixtures/test.key",
 *     }).then(invoke => invoke.result),
 * });
 * const privateKeyAccessor = new gcp.secretmanager.SecretIamMember("private_key_accessor", {
 *     project: fakePrivateKeySecret.project,
 *     secretId: fakePrivateKeySecret.secretId,
 *     role: "roles/secretmanager.secretAccessor",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-ces.iam.gserviceaccount.com`),
 * });
 * const cesAppBasic = new gcp.ces.App("ces_app_basic", {
 *     appId: "app-id",
 *     location: "us",
 *     description: "Basic CES App example",
 *     displayName: "my-app",
 *     pinned: true,
 *     languageSettings: {
 *         defaultLanguageCode: "en-US",
 *         supportedLanguageCodes: [
 *             "es-ES",
 *             "fr-FR",
 *         ],
 *         enableMultilingualSupport: true,
 *         fallbackAction: "escalate",
 *     },
 *     audioProcessingConfig: {
 *         synthesizeSpeechConfigs: [
 *             {
 *                 languageCode: "en-US",
 *                 voice: "en-US-Standard-A",
 *                 speakingRate: 1,
 *             },
 *             {
 *                 languageCode: "es-ES",
 *                 voice: "es-ES-Standard-A",
 *                 speakingRate: 0.95,
 *             },
 *         ],
 *         bargeInConfig: {
 *             bargeInAwareness: true,
 *         },
 *         inactivityTimeout: "300s",
 *         ambientSoundConfig: {
 *             prebuiltAmbientSound: "room_2",
 *             volumeGainDb: -6,
 *         },
 *     },
 *     loggingSettings: {
 *         redactionConfig: {
 *             enableRedaction: true,
 *             inspectTemplate: "projects/fake-project/locations/us/inspectTemplates/example-inspect",
 *             deidentifyTemplate: "projects/fake-project/locations/us/deidentifyTemplates/example-deidentify",
 *         },
 *         audioRecordingConfig: {
 *             gcsBucket: "gs://fake-app-audio-recordings",
 *             gcsPathPrefix: "projects/fake-project/location/us/app/test-app/123/$session/123",
 *         },
 *         bigqueryExportSettings: {
 *             dataset: "projects/fake-project/datasets/fake_app_logs",
 *             enabled: false,
 *             project: "projects/fake-project",
 *         },
 *         cloudLoggingSettings: {
 *             enableCloudLogging: true,
 *         },
 *         conversationLoggingSettings: {
 *             disableConversationLogging: true,
 *         },
 *     },
 *     modelSettings: {
 *         model: "gemini-1.5-flash",
 *         temperature: 0.5,
 *     },
 *     evaluationMetricsThresholds: {
 *         goldenEvaluationMetricsThresholds: {
 *             turnLevelMetricsThresholds: {
 *                 semanticSimilaritySuccessThreshold: 3,
 *                 overallToolInvocationCorrectnessThreshold: 1,
 *             },
 *             expectationLevelMetricsThresholds: {
 *                 toolInvocationParameterCorrectnessThreshold: 1,
 *             },
 *         },
 *     },
 *     variableDeclarations: [{
 *         name: "test",
 *         description: "test",
 *         schema: {
 *             description: "schema description",
 *             type: "ARRAY",
 *             title: "title",
 *             nullable: true,
 *             requireds: ["some_property"],
 *             enums: [
 *                 "VALUE_A",
 *                 "VALUE_B",
 *             ],
 *             ref: "#/defs/MyDefinition",
 *             uniqueItems: true,
 *             defs: JSON.stringify({
 *                 SimpleString: {
 *                     type: "STRING",
 *                     description: "A simple string definition",
 *                 },
 *             }),
 *             anyOf: JSON.stringify([{
 *                 type: "STRING",
 *                 description: "any_of option 1: string",
 *             }]),
 *             "default": JSON.stringify(false),
 *             prefixItems: JSON.stringify([{
 *                 type: "ARRAY",
 *                 description: "prefix item 1",
 *             }]),
 *             additionalProperties: JSON.stringify({
 *                 type: "BOOLEAN",
 *             }),
 *             properties: JSON.stringify({
 *                 name: {
 *                     type: "STRING",
 *                     description: "A name",
 *                 },
 *             }),
 *             items: JSON.stringify({
 *                 type: "ARRAY",
 *                 description: "An array",
 *             }),
 *         },
 *     }],
 *     globalInstruction: "You are a virtual assistant for an e-commerce platform. Be friendly and helpful.",
 *     guardrails: [],
 *     defaultChannelProfile: {
 *         channelType: "WEB_UI",
 *         disableBargeInControl: false,
 *         disableDtmf: true,
 *         personaProperty: {
 *             persona: "CONCISE",
 *         },
 *         profileId: "profile-id",
 *         webWidgetConfig: {
 *             modality: "CHAT_ONLY",
 *             theme: "LIGHT",
 *             webWidgetTitle: "Help Assistant",
 *         },
 *     },
 *     metadata: {
 *         deployment_env: "test",
 *     },
 *     timeZoneSettings: {
 *         timeZone: "America/Los_Angeles",
 *     },
 *     clientCertificateSettings: {
 *         tlsCertificate: std.file({
 *             input: "test-fixtures/cert.pem",
 *         }).then(invoke => invoke.result),
 *         privateKey: fakeSecretVersion.name,
 *         passphrase: "fakepassphrase",
 *     },
 * });
 * ```
 * ### Ces App Ambient Sound Gcs Uri
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cesAppAmbientSoundGcsUri = new gcp.ces.App("ces_app_ambient_sound_gcs_uri", {
 *     appId: "app-id",
 *     location: "us",
 *     description: "Basic CES App example",
 *     displayName: "my-app-ambient-sound-gcs-uri",
 *     languageSettings: {
 *         defaultLanguageCode: "en-US",
 *         supportedLanguageCodes: [
 *             "es-ES",
 *             "fr-FR",
 *         ],
 *         enableMultilingualSupport: true,
 *         fallbackAction: "escalate",
 *     },
 *     audioProcessingConfig: {
 *         synthesizeSpeechConfigs: [
 *             {
 *                 languageCode: "en-US",
 *                 voice: "en-US-Standard-A",
 *                 speakingRate: 1,
 *             },
 *             {
 *                 languageCode: "es-ES",
 *                 voice: "es-ES-Standard-A",
 *                 speakingRate: 0.95,
 *             },
 *         ],
 *         bargeInConfig: {
 *             bargeInAwareness: true,
 *         },
 *         inactivityTimeout: "300s",
 *         ambientSoundConfig: {
 *             gcsUri: "gs://fake-bucket/sounds/ambient.wav",
 *             volumeGainDb: -6,
 *         },
 *     },
 *     loggingSettings: {
 *         redactionConfig: {
 *             enableRedaction: true,
 *             inspectTemplate: "projects/fake-project/locations/us/inspectTemplates/example-inspect",
 *             deidentifyTemplate: "projects/fake-project/locations/us/deidentifyTemplates/example-deidentify",
 *         },
 *         audioRecordingConfig: {
 *             gcsBucket: "gs://fake-app-audio-recordings",
 *             gcsPathPrefix: "projects/fake-project/location/us/app/fake-app/123/$session/123",
 *         },
 *         bigqueryExportSettings: {
 *             dataset: "projects/fake-project/datasets/fake_app_logs",
 *             enabled: false,
 *             project: "projects/fake-project",
 *         },
 *         cloudLoggingSettings: {
 *             enableCloudLogging: true,
 *         },
 *         conversationLoggingSettings: {
 *             disableConversationLogging: true,
 *         },
 *     },
 *     modelSettings: {
 *         model: "gemini-1.5-flash",
 *         temperature: 0.5,
 *     },
 *     evaluationMetricsThresholds: {
 *         goldenEvaluationMetricsThresholds: {
 *             turnLevelMetricsThresholds: {
 *                 semanticSimilaritySuccessThreshold: 3,
 *                 overallToolInvocationCorrectnessThreshold: 1,
 *             },
 *             expectationLevelMetricsThresholds: {
 *                 toolInvocationParameterCorrectnessThreshold: 1,
 *             },
 *         },
 *     },
 *     variableDeclarations: [{
 *         name: "test",
 *         description: "test",
 *         schema: {
 *             description: "schema description",
 *             type: "ARRAY",
 *             nullable: true,
 *             requireds: ["some_property"],
 *             enums: [
 *                 "VALUE_A",
 *                 "VALUE_B",
 *             ],
 *             ref: "#/defs/MyDefinition",
 *             uniqueItems: true,
 *             defs: JSON.stringify({
 *                 SimpleString: {
 *                     type: "STRING",
 *                     description: "A simple string definition",
 *                 },
 *             }),
 *             anyOf: JSON.stringify([{
 *                 type: "STRING",
 *                 description: "any_of option 1: string",
 *             }]),
 *             "default": JSON.stringify(false),
 *             prefixItems: JSON.stringify([{
 *                 type: "ARRAY",
 *                 description: "prefix item 1",
 *             }]),
 *             additionalProperties: JSON.stringify({
 *                 type: "BOOLEAN",
 *             }),
 *             properties: JSON.stringify({
 *                 name: {
 *                     type: "STRING",
 *                     description: "A name",
 *                 },
 *             }),
 *             items: JSON.stringify({
 *                 type: "ARRAY",
 *                 description: "An array",
 *             }),
 *         },
 *     }],
 *     globalInstruction: "You are a virtual assistant for an e-commerce platform. Be friendly and helpful.",
 *     guardrails: [],
 *     defaultChannelProfile: {
 *         channelType: "WEB_UI",
 *         disableBargeInControl: false,
 *         disableDtmf: true,
 *         personaProperty: {
 *             persona: "CONCISE",
 *         },
 *         profileId: "profile-id",
 *         webWidgetConfig: {
 *             modality: "CHAT_ONLY",
 *             theme: "LIGHT",
 *             webWidgetTitle: "Help Assistant",
 *         },
 *     },
 *     metadata: {
 *         deployment_env: "test",
 *     },
 *     timeZoneSettings: {
 *         timeZone: "America/Los_Angeles",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * App can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/apps/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, App can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:ces/app:App default projects/{{project}}/locations/{{location}}/apps/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:ces/app:App default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:ces/app:App default {{location}}/{{name}}
 * ```
 */
class App extends pulumi.CustomResource {
    /**
     * Get an existing App 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 App(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of App.  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'] === App.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["appId"] = state?.appId;
            resourceInputs["audioProcessingConfig"] = state?.audioProcessingConfig;
            resourceInputs["clientCertificateSettings"] = state?.clientCertificateSettings;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["dataStoreSettings"] = state?.dataStoreSettings;
            resourceInputs["defaultChannelProfile"] = state?.defaultChannelProfile;
            resourceInputs["deploymentCount"] = state?.deploymentCount;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["evaluationMetricsThresholds"] = state?.evaluationMetricsThresholds;
            resourceInputs["globalInstruction"] = state?.globalInstruction;
            resourceInputs["guardrails"] = state?.guardrails;
            resourceInputs["languageSettings"] = state?.languageSettings;
            resourceInputs["location"] = state?.location;
            resourceInputs["loggingSettings"] = state?.loggingSettings;
            resourceInputs["metadata"] = state?.metadata;
            resourceInputs["modelSettings"] = state?.modelSettings;
            resourceInputs["name"] = state?.name;
            resourceInputs["pinned"] = state?.pinned;
            resourceInputs["project"] = state?.project;
            resourceInputs["rootAgent"] = state?.rootAgent;
            resourceInputs["timeZoneSettings"] = state?.timeZoneSettings;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["variableDeclarations"] = state?.variableDeclarations;
        }
        else {
            const args = argsOrState;
            if (args?.appId === undefined && !opts.urn) {
                throw new Error("Missing required property 'appId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["appId"] = args?.appId;
            resourceInputs["audioProcessingConfig"] = args?.audioProcessingConfig;
            resourceInputs["clientCertificateSettings"] = args?.clientCertificateSettings;
            resourceInputs["dataStoreSettings"] = args?.dataStoreSettings;
            resourceInputs["defaultChannelProfile"] = args?.defaultChannelProfile;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["evaluationMetricsThresholds"] = args?.evaluationMetricsThresholds;
            resourceInputs["globalInstruction"] = args?.globalInstruction;
            resourceInputs["guardrails"] = args?.guardrails;
            resourceInputs["languageSettings"] = args?.languageSettings;
            resourceInputs["location"] = args?.location;
            resourceInputs["loggingSettings"] = args?.loggingSettings;
            resourceInputs["metadata"] = args?.metadata;
            resourceInputs["modelSettings"] = args?.modelSettings;
            resourceInputs["pinned"] = args?.pinned;
            resourceInputs["project"] = args?.project;
            resourceInputs["rootAgent"] = args?.rootAgent;
            resourceInputs["timeZoneSettings"] = args?.timeZoneSettings;
            resourceInputs["variableDeclarations"] = args?.variableDeclarations;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["deploymentCount"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(App.__pulumiType, name, resourceInputs, opts);
    }
}
exports.App = App;
/** @internal */
App.__pulumiType = 'gcp:ces/app:App';
//# sourceMappingURL=app.js.map