All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.diagflow.kotlin.Intent.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.diagflow.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.diagflow.kotlin.outputs.IntentFollowupIntentInfo
import com.pulumi.gcp.diagflow.kotlin.outputs.IntentFollowupIntentInfo.Companion.toKotlin
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [Intent].
 */
@PulumiTagMarker
public class IntentResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: IntentArgs = IntentArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend IntentArgsBuilder.() -> Unit) {
        val builder = IntentArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Intent {
        val builtJavaResource = com.pulumi.gcp.diagflow.Intent(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Intent(builtJavaResource)
    }
}

/**
 * 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"});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic_agent = gcp.diagflow.Agent("basic_agent",
 *     display_name="example_agent",
 *     default_language_code="en",
 *     time_zone="America/New_York")
 * basic_intent = gcp.diagflow.Intent("basic_intent", display_name="basic-intent")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basicAgent = new Gcp.Diagflow.Agent("basic_agent", new()
 *     {
 *         DisplayName = "example_agent",
 *         DefaultLanguageCode = "en",
 *         TimeZone = "America/New_York",
 *     });
 *     var basicIntent = new Gcp.Diagflow.Intent("basic_intent", new()
 *     {
 *         DisplayName = "basic-intent",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := diagflow.NewAgent(ctx, "basic_agent", &diagflow.AgentArgs{
 * 			DisplayName:         pulumi.String("example_agent"),
 * 			DefaultLanguageCode: pulumi.String("en"),
 * 			TimeZone:            pulumi.String("America/New_York"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = diagflow.NewIntent(ctx, "basic_intent", &diagflow.IntentArgs{
 * 			DisplayName: pulumi.String("basic-intent"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.diagflow.Agent;
 * import com.pulumi.gcp.diagflow.AgentArgs;
 * import com.pulumi.gcp.diagflow.Intent;
 * import com.pulumi.gcp.diagflow.IntentArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var basicAgent = new Agent("basicAgent", AgentArgs.builder()
 *             .displayName("example_agent")
 *             .defaultLanguageCode("en")
 *             .timeZone("America/New_York")
 *             .build());
 *         var basicIntent = new Intent("basicIntent", IntentArgs.builder()
 *             .displayName("basic-intent")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basicAgent:
 *     type: gcp:diagflow:Agent
 *     name: basic_agent
 *     properties:
 *       displayName: example_agent
 *       defaultLanguageCode: en
 *       timeZone: America/New_York
 *   basicIntent:
 *     type: gcp:diagflow:Intent
 *     name: basic_intent
 *     properties:
 *       displayName: basic-intent
 * ```
 * 
 * ### 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",
 * });
 * 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",
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * agent_project = gcp.organizations.Project("agent_project",
 *     project_id="my-project",
 *     name="my-project",
 *     org_id="123456789")
 * agent_project_service = gcp.projects.Service("agent_project",
 *     project=agent_project.project_id,
 *     service="dialogflow.googleapis.com",
 *     disable_dependent_services=False)
 * dialogflow_service_account = gcp.serviceaccount.Account("dialogflow_service_account", account_id="my-account")
 * agent_create = gcp.projects.IAMMember("agent_create",
 *     project=agent_project_service.project,
 *     role="roles/dialogflow.admin",
 *     member=dialogflow_service_account.email.apply(lambda email: f"serviceAccount:{email}"))
 * basic_agent = gcp.diagflow.Agent("basic_agent",
 *     project=agent_project.project_id,
 *     display_name="example_agent",
 *     default_language_code="en",
 *     time_zone="America/New_York")
 * full_intent = gcp.diagflow.Intent("full_intent",
 *     project=agent_project.project_id,
 *     display_name="full-intent",
 *     webhook_state="WEBHOOK_STATE_ENABLED",
 *     priority=1,
 *     is_fallback=False,
 *     ml_disabled=True,
 *     action="some_action",
 *     reset_contexts=True,
 *     input_context_names=[agent_project.project_id.apply(lambda project_id: f"projects/{project_id}/agent/sessions/-/contexts/some_id")],
 *     events=["some_event"],
 *     default_response_platforms=[
 *         "FACEBOOK",
 *         "SLACK",
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var agentProject = new Gcp.Organizations.Project("agent_project", new()
 *     {
 *         ProjectId = "my-project",
 *         Name = "my-project",
 *         OrgId = "123456789",
 *     });
 *     var agentProjectService = new Gcp.Projects.Service("agent_project", new()
 *     {
 *         Project = agentProject.ProjectId,
 *         ServiceName = "dialogflow.googleapis.com",
 *         DisableDependentServices = false,
 *     });
 *     var dialogflowServiceAccount = new Gcp.ServiceAccount.Account("dialogflow_service_account", new()
 *     {
 *         AccountId = "my-account",
 *     });
 *     var agentCreate = new Gcp.Projects.IAMMember("agent_create", new()
 *     {
 *         Project = agentProjectService.Project,
 *         Role = "roles/dialogflow.admin",
 *         Member = dialogflowServiceAccount.Email.Apply(email => $"serviceAccount:{email}"),
 *     });
 *     var basicAgent = new Gcp.Diagflow.Agent("basic_agent", new()
 *     {
 *         Project = agentProject.ProjectId,
 *         DisplayName = "example_agent",
 *         DefaultLanguageCode = "en",
 *         TimeZone = "America/New_York",
 *     });
 *     var fullIntent = new Gcp.Diagflow.Intent("full_intent", new()
 *     {
 *         Project = agentProject.ProjectId,
 *         DisplayName = "full-intent",
 *         WebhookState = "WEBHOOK_STATE_ENABLED",
 *         Priority = 1,
 *         IsFallback = false,
 *         MlDisabled = true,
 *         Action = "some_action",
 *         ResetContexts = true,
 *         InputContextNames = new[]
 *         {
 *             agentProject.ProjectId.Apply(projectId => $"projects/{projectId}/agent/sessions/-/contexts/some_id"),
 *         },
 *         Events = new[]
 *         {
 *             "some_event",
 *         },
 *         DefaultResponsePlatforms = new[]
 *         {
 *             "FACEBOOK",
 *             "SLACK",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/serviceaccount"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		agentProject, err := organizations.NewProject(ctx, "agent_project", &organizations.ProjectArgs{
 * 			ProjectId: pulumi.String("my-project"),
 * 			Name:      pulumi.String("my-project"),
 * 			OrgId:     pulumi.String("123456789"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		agentProjectService, err := projects.NewService(ctx, "agent_project", &projects.ServiceArgs{
 * 			Project:                  agentProject.ProjectId,
 * 			Service:                  pulumi.String("dialogflow.googleapis.com"),
 * 			DisableDependentServices: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		dialogflowServiceAccount, err := serviceaccount.NewAccount(ctx, "dialogflow_service_account", &serviceaccount.AccountArgs{
 * 			AccountId: pulumi.String("my-account"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = projects.NewIAMMember(ctx, "agent_create", &projects.IAMMemberArgs{
 * 			Project: agentProjectService.Project,
 * 			Role:    pulumi.String("roles/dialogflow.admin"),
 * 			Member: dialogflowServiceAccount.Email.ApplyT(func(email string) (string, error) {
 * 				return fmt.Sprintf("serviceAccount:%v", email), nil
 * 			}).(pulumi.StringOutput),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = diagflow.NewAgent(ctx, "basic_agent", &diagflow.AgentArgs{
 * 			Project:             agentProject.ProjectId,
 * 			DisplayName:         pulumi.String("example_agent"),
 * 			DefaultLanguageCode: pulumi.String("en"),
 * 			TimeZone:            pulumi.String("America/New_York"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = diagflow.NewIntent(ctx, "full_intent", &diagflow.IntentArgs{
 * 			Project:       agentProject.ProjectId,
 * 			DisplayName:   pulumi.String("full-intent"),
 * 			WebhookState:  pulumi.String("WEBHOOK_STATE_ENABLED"),
 * 			Priority:      pulumi.Int(1),
 * 			IsFallback:    pulumi.Bool(false),
 * 			MlDisabled:    pulumi.Bool(true),
 * 			Action:        pulumi.String("some_action"),
 * 			ResetContexts: pulumi.Bool(true),
 * 			InputContextNames: pulumi.StringArray{
 * 				agentProject.ProjectId.ApplyT(func(projectId string) (string, error) {
 * 					return fmt.Sprintf("projects/%v/agent/sessions/-/contexts/some_id", projectId), nil
 * 				}).(pulumi.StringOutput),
 * 			},
 * 			Events: pulumi.StringArray{
 * 				pulumi.String("some_event"),
 * 			},
 * 			DefaultResponsePlatforms: pulumi.StringArray{
 * 				pulumi.String("FACEBOOK"),
 * 				pulumi.String("SLACK"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.organizations.Project;
 * import com.pulumi.gcp.organizations.ProjectArgs;
 * import com.pulumi.gcp.projects.Service;
 * import com.pulumi.gcp.projects.ServiceArgs;
 * import com.pulumi.gcp.serviceaccount.Account;
 * import com.pulumi.gcp.serviceaccount.AccountArgs;
 * import com.pulumi.gcp.projects.IAMMember;
 * import com.pulumi.gcp.projects.IAMMemberArgs;
 * import com.pulumi.gcp.diagflow.Agent;
 * import com.pulumi.gcp.diagflow.AgentArgs;
 * import com.pulumi.gcp.diagflow.Intent;
 * import com.pulumi.gcp.diagflow.IntentArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var agentProject = new Project("agentProject", ProjectArgs.builder()
 *             .projectId("my-project")
 *             .name("my-project")
 *             .orgId("123456789")
 *             .build());
 *         var agentProjectService = new Service("agentProjectService", ServiceArgs.builder()
 *             .project(agentProject.projectId())
 *             .service("dialogflow.googleapis.com")
 *             .disableDependentServices(false)
 *             .build());
 *         var dialogflowServiceAccount = new Account("dialogflowServiceAccount", AccountArgs.builder()
 *             .accountId("my-account")
 *             .build());
 *         var agentCreate = new IAMMember("agentCreate", IAMMemberArgs.builder()
 *             .project(agentProjectService.project())
 *             .role("roles/dialogflow.admin")
 *             .member(dialogflowServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
 *             .build());
 *         var basicAgent = new Agent("basicAgent", AgentArgs.builder()
 *             .project(agentProject.projectId())
 *             .displayName("example_agent")
 *             .defaultLanguageCode("en")
 *             .timeZone("America/New_York")
 *             .build());
 *         var fullIntent = new Intent("fullIntent", IntentArgs.builder()
 *             .project(agentProject.projectId())
 *             .displayName("full-intent")
 *             .webhookState("WEBHOOK_STATE_ENABLED")
 *             .priority(1)
 *             .isFallback(false)
 *             .mlDisabled(true)
 *             .action("some_action")
 *             .resetContexts(true)
 *             .inputContextNames(agentProject.projectId().applyValue(projectId -> String.format("projects/%s/agent/sessions/-/contexts/some_id", projectId)))
 *             .events("some_event")
 *             .defaultResponsePlatforms(
 *                 "FACEBOOK",
 *                 "SLACK")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   agentProject:
 *     type: gcp:organizations:Project
 *     name: agent_project
 *     properties:
 *       projectId: my-project
 *       name: my-project
 *       orgId: '123456789'
 *   agentProjectService:
 *     type: gcp:projects:Service
 *     name: agent_project
 *     properties:
 *       project: ${agentProject.projectId}
 *       service: dialogflow.googleapis.com
 *       disableDependentServices: false
 *   dialogflowServiceAccount:
 *     type: gcp:serviceaccount:Account
 *     name: dialogflow_service_account
 *     properties:
 *       accountId: my-account
 *   agentCreate:
 *     type: gcp:projects:IAMMember
 *     name: agent_create
 *     properties:
 *       project: ${agentProjectService.project}
 *       role: roles/dialogflow.admin
 *       member: serviceAccount:${dialogflowServiceAccount.email}
 *   basicAgent:
 *     type: gcp:diagflow:Agent
 *     name: basic_agent
 *     properties:
 *       project: ${agentProject.projectId}
 *       displayName: example_agent
 *       defaultLanguageCode: en
 *       timeZone: America/New_York
 *   fullIntent:
 *     type: gcp:diagflow:Intent
 *     name: full_intent
 *     properties:
 *       project: ${agentProject.projectId}
 *       displayName: full-intent
 *       webhookState: WEBHOOK_STATE_ENABLED
 *       priority: 1
 *       isFallback: false
 *       mlDisabled: true
 *       action: some_action
 *       resetContexts: true
 *       inputContextNames:
 *         - projects/${agentProject.projectId}/agent/sessions/-/contexts/some_id
 *       events:
 *         - some_event
 *       defaultResponsePlatforms:
 *         - FACEBOOK
 *         - SLACK
 * ```
 * 
 * ## 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}}
 * ```
 */
public class Intent internal constructor(
    override val javaResource: com.pulumi.gcp.diagflow.Intent,
) : KotlinCustomResource(javaResource, IntentMapper) {
    /**
     * The name of the action associated with the intent.
     * Note: The action name must not contain whitespaces.
     */
    public val action: Output
        get() = javaResource.action().applyValue({ args0 -> args0 })

    /**
     * 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`.
     */
    public val defaultResponsePlatforms: Output>?
        get() = javaResource.defaultResponsePlatforms().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The name of this intent to be displayed on the console.
     * - - -
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val events: Output>?
        get() = javaResource.events().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }).orElse(null)
        })

    /**
     * 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.
     */
    public val followupIntentInfos: Output>
        get() = javaResource.followupIntentInfos().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            })
        })

    /**
     * The list of context names required for this intent to be triggered.
     * Format: projects//agent/sessions/-/contexts/.
     */
    public val inputContextNames: Output>?
        get() = javaResource.inputContextNames().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * Indicates whether this is a fallback intent.
     */
    public val isFallback: Output
        get() = javaResource.isFallback().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val mlDisabled: Output
        get() = javaResource.mlDisabled().applyValue({ args0 -> args0 })

    /**
     * The unique identifier of this intent.
     * Format: projects//agent/intents/.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The unique identifier of the parent intent in the chain of followup intents.
     * Format: projects//agent/intents/.
     */
    public val parentFollowupIntentName: Output
        get() = javaResource.parentFollowupIntentName().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val priority: Output
        get() = javaResource.priority().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * Indicates whether to delete all contexts in the current session when this intent is matched.
     */
    public val resetContexts: Output
        get() = javaResource.resetContexts().applyValue({ args0 -> args0 })

    /**
     * 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/.
     */
    public val rootFollowupIntentName: Output
        get() = javaResource.rootFollowupIntentName().applyValue({ args0 -> args0 })

    /**
     * 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`.
     */
    public val webhookState: Output
        get() = javaResource.webhookState().applyValue({ args0 -> args0 })
}

public object IntentMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.diagflow.Intent::class == javaResource::class

    override fun map(javaResource: Resource): Intent = Intent(
        javaResource as
            com.pulumi.gcp.diagflow.Intent,
    )
}

/**
 * @see [Intent].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Intent].
 */
public suspend fun intent(name: String, block: suspend IntentResourceBuilder.() -> Unit): Intent {
    val builder = IntentResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Intent].
 * @param name The _unique_ name of the resulting resource.
 */
public fun intent(name: String): Intent {
    val builder = IntentResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy