UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

132 lines 6.18 kB
"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.ConversationProfile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A conversation profile configures a set of parameters that control the suggestions made to an agent. These parameters control the suggestions that are surfaced during runtime. Each profile configures either a Dialogflow virtual agent or a human agent for a conversation. * * To get more information about ConversationProfile, see: * * * [API documentation](https://cloud.google.com/dialogflow/docs/reference/rest/v2beta1/projects/conversationProfiles) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/docs/) * * ## Example Usage * * ### Dialogflow Conversation Profile Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basicAgent = new gcp.diagflow.Agent("basic_agent", { * displayName: "example_agent", * defaultLanguageCode: "en-us", * timeZone: "America/New_York", * }); * const basicProfile = new gcp.diagflow.ConversationProfile("basic_profile", { * displayName: "dialogflow-profile", * location: "global", * automatedAgentConfig: { * agent: pulumi.interpolate`projects/${basicAgent.id}/locations/global/agent/environments/draft`, * }, * humanAgentAssistantConfig: { * messageAnalysisConfig: { * enableEntityExtraction: true, * enableSentimentAnalysis: true, * }, * }, * }); * ``` * * ## Import * * ConversationProfile can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, ConversationProfile can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/conversationProfile:ConversationProfile default {{name}} * ``` */ class ConversationProfile extends pulumi.CustomResource { /** * Get an existing ConversationProfile 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 ConversationProfile(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ConversationProfile. 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'] === ConversationProfile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["automatedAgentConfig"] = state?.automatedAgentConfig; resourceInputs["displayName"] = state?.displayName; resourceInputs["humanAgentAssistantConfig"] = state?.humanAgentAssistantConfig; resourceInputs["humanAgentHandoffConfig"] = state?.humanAgentHandoffConfig; resourceInputs["languageCode"] = state?.languageCode; resourceInputs["location"] = state?.location; resourceInputs["loggingConfig"] = state?.loggingConfig; resourceInputs["name"] = state?.name; resourceInputs["newMessageEventNotificationConfig"] = state?.newMessageEventNotificationConfig; resourceInputs["notificationConfig"] = state?.notificationConfig; resourceInputs["project"] = state?.project; resourceInputs["securitySettings"] = state?.securitySettings; resourceInputs["sttConfig"] = state?.sttConfig; resourceInputs["timeZone"] = state?.timeZone; resourceInputs["ttsConfig"] = state?.ttsConfig; } else { const args = argsOrState; 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["automatedAgentConfig"] = args?.automatedAgentConfig; resourceInputs["displayName"] = args?.displayName; resourceInputs["humanAgentAssistantConfig"] = args?.humanAgentAssistantConfig; resourceInputs["humanAgentHandoffConfig"] = args?.humanAgentHandoffConfig; resourceInputs["languageCode"] = args?.languageCode; resourceInputs["location"] = args?.location; resourceInputs["loggingConfig"] = args?.loggingConfig; resourceInputs["newMessageEventNotificationConfig"] = args?.newMessageEventNotificationConfig; resourceInputs["notificationConfig"] = args?.notificationConfig; resourceInputs["project"] = args?.project; resourceInputs["securitySettings"] = args?.securitySettings; resourceInputs["sttConfig"] = args?.sttConfig; resourceInputs["timeZone"] = args?.timeZone; resourceInputs["ttsConfig"] = args?.ttsConfig; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ConversationProfile.__pulumiType, name, resourceInputs, opts); } } exports.ConversationProfile = ConversationProfile; /** @internal */ ConversationProfile.__pulumiType = 'gcp:diagflow/conversationProfile:ConversationProfile'; //# sourceMappingURL=conversationProfile.js.map