import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a Dialogflow intent. Intents convert a number of user expressions or patterns into an action. An action * is an extraction of a user command or sentence semantics. * * To get more information about Intent, see: * * * [API documentation](https://cloud.google.com/dialogflow/docs/reference/rest/v2/projects.agent.intents) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/docs/) * * ## Example Usage * * ### Dialogflow Intent 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", * timeZone: "America/New_York", * }); * const basicIntent = new gcp.diagflow.Intent("basic_intent", {displayName: "basic-intent"}, { * dependsOn: [basicAgent], * }); * ``` * ### Dialogflow Intent Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const agentProject = new gcp.organizations.Project("agent_project", { * projectId: "my-project", * name: "my-project", * orgId: "123456789", * deletionPolicy: "DELETE", * }); * const agentProjectService = new gcp.projects.Service("agent_project", { * project: agentProject.projectId, * service: "dialogflow.googleapis.com", * disableDependentServices: false, * }); * const dialogflowServiceAccount = new gcp.serviceaccount.Account("dialogflow_service_account", {accountId: "my-account"}); * const agentCreate = new gcp.projects.IAMMember("agent_create", { * project: agentProjectService.project, * role: "roles/dialogflow.admin", * member: pulumi.interpolate`serviceAccount:${dialogflowServiceAccount.email}`, * }); * const basicAgent = new gcp.diagflow.Agent("basic_agent", { * project: agentProject.projectId, * displayName: "example_agent", * defaultLanguageCode: "en", * timeZone: "America/New_York", * }); * const fullIntent = new gcp.diagflow.Intent("full_intent", { * project: agentProject.projectId, * displayName: "full-intent", * webhookState: "WEBHOOK_STATE_ENABLED", * priority: 1, * isFallback: false, * mlDisabled: true, * action: "some_action", * resetContexts: true, * inputContextNames: [pulumi.interpolate`projects/${agentProject.projectId}/agent/sessions/-/contexts/some_id`], * events: ["some_event"], * defaultResponsePlatforms: [ * "FACEBOOK", * "SLACK", * ], * }, { * dependsOn: [basicAgent], * }); * ``` * * ## Import * * Intent can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, Intent can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/intent:Intent default {{name}} * ``` */ export declare class Intent extends pulumi.CustomResource { /** * Get an existing Intent 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: string, id: pulumi.Input, state?: IntentState, opts?: pulumi.CustomResourceOptions): Intent; /** * Returns true if the given object is an instance of Intent. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Intent; /** * The name of the action associated with the intent. * Note: The action name must not contain whitespaces. */ readonly action: pulumi.Output; /** * The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED * (i.e. default platform). * Each value may be one of: `FACEBOOK`, `SLACK`, `TELEGRAM`, `KIK`, `SKYPE`, `LINE`, `VIBER`, `ACTIONS_ON_GOOGLE`, `GOOGLE_HANGOUTS`. */ readonly defaultResponsePlatforms: pulumi.Output; /** * The name of this intent to be displayed on the console. */ readonly displayName: pulumi.Output; /** * The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of * the contexts must be present in the active user session for an event to trigger this intent. See the * [events reference](https://cloud.google.com/dialogflow/docs/events-overview) for more details. */ readonly events: pulumi.Output; /** * Information about all followup intents that have this intent as a direct or indirect parent. We populate this field * only in the output. * Structure is documented below. */ readonly followupIntentInfos: pulumi.Output; /** * The list of context names required for this intent to be triggered. * Format: projects//agent/sessions/-/contexts/. */ readonly inputContextNames: pulumi.Output; /** * Indicates whether this is a fallback intent. */ readonly isFallback: pulumi.Output; /** * Indicates whether Machine Learning is disabled for the intent. * Note: If mlDisabled setting is set to true, then this intent is not taken into account during inference in ML * ONLY match mode. Also, auto-markup in the UI is turned off. */ readonly mlDisabled: pulumi.Output; /** * The unique identifier of this intent. * Format: projects//agent/intents/. */ readonly name: pulumi.Output; /** * The unique identifier of the parent intent in the chain of followup intents. * Format: projects//agent/intents/. */ readonly parentFollowupIntentName: pulumi.Output; /** * The priority of this intent. Higher numbers represent higher priorities. * - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds * to the Normal priority in the console. * - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ readonly priority: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Indicates whether to delete all contexts in the current session when this intent is matched. */ readonly resetContexts: pulumi.Output; /** * The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup * intents chain for this intent. * Format: projects//agent/intents/. */ readonly rootFollowupIntentName: pulumi.Output; /** * Indicates whether webhooks are enabled for the intent. * * WEBHOOK_STATE_ENABLED: Webhook is enabled in the agent and in the intent. * * WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING: Webhook is enabled in the agent and in the intent. Also, each slot * filling prompt is forwarded to the webhook. * Possible values are: `WEBHOOK_STATE_ENABLED`, `WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING`. */ readonly webhookState: pulumi.Output; /** * Create a Intent resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: IntentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Intent resources. */ export interface IntentState { /** * The name of the action associated with the intent. * Note: The action name must not contain whitespaces. */ action?: pulumi.Input; /** * The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED * (i.e. default platform). * Each value may be one of: `FACEBOOK`, `SLACK`, `TELEGRAM`, `KIK`, `SKYPE`, `LINE`, `VIBER`, `ACTIONS_ON_GOOGLE`, `GOOGLE_HANGOUTS`. */ defaultResponsePlatforms?: pulumi.Input[]>; /** * The name of this intent to be displayed on the console. */ displayName?: pulumi.Input; /** * The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of * the contexts must be present in the active user session for an event to trigger this intent. See the * [events reference](https://cloud.google.com/dialogflow/docs/events-overview) for more details. */ events?: pulumi.Input[]>; /** * Information about all followup intents that have this intent as a direct or indirect parent. We populate this field * only in the output. * Structure is documented below. */ followupIntentInfos?: pulumi.Input[]>; /** * The list of context names required for this intent to be triggered. * Format: projects//agent/sessions/-/contexts/. */ inputContextNames?: pulumi.Input[]>; /** * Indicates whether this is a fallback intent. */ isFallback?: pulumi.Input; /** * Indicates whether Machine Learning is disabled for the intent. * Note: If mlDisabled setting is set to true, then this intent is not taken into account during inference in ML * ONLY match mode. Also, auto-markup in the UI is turned off. */ mlDisabled?: pulumi.Input; /** * The unique identifier of this intent. * Format: projects//agent/intents/. */ name?: pulumi.Input; /** * The unique identifier of the parent intent in the chain of followup intents. * Format: projects//agent/intents/. */ parentFollowupIntentName?: pulumi.Input; /** * The priority of this intent. Higher numbers represent higher priorities. * - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds * to the Normal priority in the console. * - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ priority?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Indicates whether to delete all contexts in the current session when this intent is matched. */ resetContexts?: pulumi.Input; /** * The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup * intents chain for this intent. * Format: projects//agent/intents/. */ rootFollowupIntentName?: pulumi.Input; /** * Indicates whether webhooks are enabled for the intent. * * WEBHOOK_STATE_ENABLED: Webhook is enabled in the agent and in the intent. * * WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING: Webhook is enabled in the agent and in the intent. Also, each slot * filling prompt is forwarded to the webhook. * Possible values are: `WEBHOOK_STATE_ENABLED`, `WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING`. */ webhookState?: pulumi.Input; } /** * The set of arguments for constructing a Intent resource. */ export interface IntentArgs { /** * The name of the action associated with the intent. * Note: The action name must not contain whitespaces. */ action?: pulumi.Input; /** * The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED * (i.e. default platform). * Each value may be one of: `FACEBOOK`, `SLACK`, `TELEGRAM`, `KIK`, `SKYPE`, `LINE`, `VIBER`, `ACTIONS_ON_GOOGLE`, `GOOGLE_HANGOUTS`. */ defaultResponsePlatforms?: pulumi.Input[]>; /** * The name of this intent to be displayed on the console. */ displayName: pulumi.Input; /** * The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of * the contexts must be present in the active user session for an event to trigger this intent. See the * [events reference](https://cloud.google.com/dialogflow/docs/events-overview) for more details. */ events?: pulumi.Input[]>; /** * The list of context names required for this intent to be triggered. * Format: projects//agent/sessions/-/contexts/. */ inputContextNames?: pulumi.Input[]>; /** * Indicates whether this is a fallback intent. */ isFallback?: pulumi.Input; /** * Indicates whether Machine Learning is disabled for the intent. * Note: If mlDisabled setting is set to true, then this intent is not taken into account during inference in ML * ONLY match mode. Also, auto-markup in the UI is turned off. */ mlDisabled?: pulumi.Input; /** * The unique identifier of the parent intent in the chain of followup intents. * Format: projects//agent/intents/. */ parentFollowupIntentName?: pulumi.Input; /** * The priority of this intent. Higher numbers represent higher priorities. * - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds * to the Normal priority in the console. * - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ priority?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Indicates whether to delete all contexts in the current session when this intent is matched. */ resetContexts?: pulumi.Input; /** * Indicates whether webhooks are enabled for the intent. * * WEBHOOK_STATE_ENABLED: Webhook is enabled in the agent and in the intent. * * WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING: Webhook is enabled in the agent and in the intent. Also, each slot * filling prompt is forwarded to the webhook. * Possible values are: `WEBHOOK_STATE_ENABLED`, `WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING`. */ webhookState?: pulumi.Input; }