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

com.pulumi.gcp.diagflow.kotlin.CxIntentArgs.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.core.Output.of
import com.pulumi.gcp.diagflow.CxIntentArgs.builder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxIntentParameterArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxIntentParameterArgsBuilder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxIntentTrainingPhraseArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxIntentTrainingPhraseArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * An intent represents a user's intent to interact with a conversational agent.
 * To get more information about Intent, see:
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 * ## Example Usage
 * ### Dialogflowcx Intent Full
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "fr",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const basicIntent = new gcp.diagflow.CxIntent("basic_intent", {
 *     parent: agent.id,
 *     displayName: "Example",
 *     priority: 1,
 *     description: "Intent example",
 *     trainingPhrases: [{
 *         parts: [
 *             {
 *                 text: "training",
 *             },
 *             {
 *                 text: "phrase",
 *             },
 *             {
 *                 text: "example",
 *             },
 *         ],
 *         repeatCount: 1,
 *     }],
 *     parameters: [{
 *         id: "param1",
 *         entityType: "projects/-/locations/-/agents/-/entityTypes/sys.date",
 *     }],
 *     labels: {
 *         label1: "value1",
 *         label2: "value2",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * agent = gcp.diagflow.CxAgent("agent",
 *     display_name="dialogflowcx-agent",
 *     location="global",
 *     default_language_code="en",
 *     supported_language_codes=[
 *         "fr",
 *         "de",
 *         "es",
 *     ],
 *     time_zone="America/New_York",
 *     description="Example description.",
 *     avatar_uri="https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enable_stackdriver_logging=True,
 *     enable_spell_correction=True,
 *     speech_to_text_settings=gcp.diagflow.CxAgentSpeechToTextSettingsArgs(
 *         enable_speech_adaptation=True,
 *     ))
 * basic_intent = gcp.diagflow.CxIntent("basic_intent",
 *     parent=agent.id,
 *     display_name="Example",
 *     priority=1,
 *     description="Intent example",
 *     training_phrases=[gcp.diagflow.CxIntentTrainingPhraseArgs(
 *         parts=[
 *             gcp.diagflow.CxIntentTrainingPhrasePartArgs(
 *                 text="training",
 *             ),
 *             gcp.diagflow.CxIntentTrainingPhrasePartArgs(
 *                 text="phrase",
 *             ),
 *             gcp.diagflow.CxIntentTrainingPhrasePartArgs(
 *                 text="example",
 *             ),
 *         ],
 *         repeat_count=1,
 *     )],
 *     parameters=[gcp.diagflow.CxIntentParameterArgs(
 *         id="param1",
 *         entity_type="projects/-/locations/-/agents/-/entityTypes/sys.date",
 *     )],
 *     labels={
 *         "label1": "value1",
 *         "label2": "value2",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var agent = new Gcp.Diagflow.CxAgent("agent", new()
 *     {
 *         DisplayName = "dialogflowcx-agent",
 *         Location = "global",
 *         DefaultLanguageCode = "en",
 *         SupportedLanguageCodes = new[]
 *         {
 *             "fr",
 *             "de",
 *             "es",
 *         },
 *         TimeZone = "America/New_York",
 *         Description = "Example description.",
 *         AvatarUri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *         EnableStackdriverLogging = true,
 *         EnableSpellCorrection = true,
 *         SpeechToTextSettings = new Gcp.Diagflow.Inputs.CxAgentSpeechToTextSettingsArgs
 *         {
 *             EnableSpeechAdaptation = true,
 *         },
 *     });
 *     var basicIntent = new Gcp.Diagflow.CxIntent("basic_intent", new()
 *     {
 *         Parent = agent.Id,
 *         DisplayName = "Example",
 *         Priority = 1,
 *         Description = "Intent example",
 *         TrainingPhrases = new[]
 *         {
 *             new Gcp.Diagflow.Inputs.CxIntentTrainingPhraseArgs
 *             {
 *                 Parts = new[]
 *                 {
 *                     new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
 *                     {
 *                         Text = "training",
 *                     },
 *                     new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
 *                     {
 *                         Text = "phrase",
 *                     },
 *                     new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
 *                     {
 *                         Text = "example",
 *                     },
 *                 },
 *                 RepeatCount = 1,
 *             },
 *         },
 *         Parameters = new[]
 *         {
 *             new Gcp.Diagflow.Inputs.CxIntentParameterArgs
 *             {
 *                 Id = "param1",
 *                 EntityType = "projects/-/locations/-/agents/-/entityTypes/sys.date",
 *             },
 *         },
 *         Labels =
 *         {
 *             { "label1", "value1" },
 *             { "label2", "value2" },
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
 * 			DisplayName:         pulumi.String("dialogflowcx-agent"),
 * 			Location:            pulumi.String("global"),
 * 			DefaultLanguageCode: pulumi.String("en"),
 * 			SupportedLanguageCodes: pulumi.StringArray{
 * 				pulumi.String("fr"),
 * 				pulumi.String("de"),
 * 				pulumi.String("es"),
 * 			},
 * 			TimeZone:                 pulumi.String("America/New_York"),
 * 			Description:              pulumi.String("Example description."),
 * 			AvatarUri:                pulumi.String("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"),
 * 			EnableStackdriverLogging: pulumi.Bool(true),
 * 			EnableSpellCorrection:    pulumi.Bool(true),
 * 			SpeechToTextSettings: &diagflow.CxAgentSpeechToTextSettingsArgs{
 * 				EnableSpeechAdaptation: pulumi.Bool(true),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = diagflow.NewCxIntent(ctx, "basic_intent", &diagflow.CxIntentArgs{
 * 			Parent:      agent.ID(),
 * 			DisplayName: pulumi.String("Example"),
 * 			Priority:    pulumi.Int(1),
 * 			Description: pulumi.String("Intent example"),
 * 			TrainingPhrases: diagflow.CxIntentTrainingPhraseArray{
 * 				&diagflow.CxIntentTrainingPhraseArgs{
 * 					Parts: diagflow.CxIntentTrainingPhrasePartArray{
 * 						&diagflow.CxIntentTrainingPhrasePartArgs{
 * 							Text: pulumi.String("training"),
 * 						},
 * 						&diagflow.CxIntentTrainingPhrasePartArgs{
 * 							Text: pulumi.String("phrase"),
 * 						},
 * 						&diagflow.CxIntentTrainingPhrasePartArgs{
 * 							Text: pulumi.String("example"),
 * 						},
 * 					},
 * 					RepeatCount: pulumi.Int(1),
 * 				},
 * 			},
 * 			Parameters: diagflow.CxIntentParameterArray{
 * 				&diagflow.CxIntentParameterArgs{
 * 					Id:         pulumi.String("param1"),
 * 					EntityType: pulumi.String("projects/-/locations/-/agents/-/entityTypes/sys.date"),
 * 				},
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"label1": pulumi.String("value1"),
 * 				"label2": pulumi.String("value2"),
 * 			},
 * 		})
 * 		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.CxAgent;
 * import com.pulumi.gcp.diagflow.CxAgentArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
 * import com.pulumi.gcp.diagflow.CxIntent;
 * import com.pulumi.gcp.diagflow.CxIntentArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxIntentParameterArgs;
 * 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 agent = new CxAgent("agent", CxAgentArgs.builder()
 *             .displayName("dialogflowcx-agent")
 *             .location("global")
 *             .defaultLanguageCode("en")
 *             .supportedLanguageCodes(
 *                 "fr",
 *                 "de",
 *                 "es")
 *             .timeZone("America/New_York")
 *             .description("Example description.")
 *             .avatarUri("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png")
 *             .enableStackdriverLogging(true)
 *             .enableSpellCorrection(true)
 *             .speechToTextSettings(CxAgentSpeechToTextSettingsArgs.builder()
 *                 .enableSpeechAdaptation(true)
 *                 .build())
 *             .build());
 *         var basicIntent = new CxIntent("basicIntent", CxIntentArgs.builder()
 *             .parent(agent.id())
 *             .displayName("Example")
 *             .priority(1)
 *             .description("Intent example")
 *             .trainingPhrases(CxIntentTrainingPhraseArgs.builder()
 *                 .parts(
 *                     CxIntentTrainingPhrasePartArgs.builder()
 *                         .text("training")
 *                         .build(),
 *                     CxIntentTrainingPhrasePartArgs.builder()
 *                         .text("phrase")
 *                         .build(),
 *                     CxIntentTrainingPhrasePartArgs.builder()
 *                         .text("example")
 *                         .build())
 *                 .repeatCount(1)
 *                 .build())
 *             .parameters(CxIntentParameterArgs.builder()
 *                 .id("param1")
 *                 .entityType("projects/-/locations/-/agents/-/entityTypes/sys.date")
 *                 .build())
 *             .labels(Map.ofEntries(
 *                 Map.entry("label1", "value1"),
 *                 Map.entry("label2", "value2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   agent:
 *     type: gcp:diagflow:CxAgent
 *     properties:
 *       displayName: dialogflowcx-agent
 *       location: global
 *       defaultLanguageCode: en
 *       supportedLanguageCodes:
 *         - fr
 *         - de
 *         - es
 *       timeZone: America/New_York
 *       description: Example description.
 *       avatarUri: https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png
 *       enableStackdriverLogging: true
 *       enableSpellCorrection: true
 *       speechToTextSettings:
 *         enableSpeechAdaptation: true
 *   basicIntent:
 *     type: gcp:diagflow:CxIntent
 *     name: basic_intent
 *     properties:
 *       parent: ${agent.id}
 *       displayName: Example
 *       priority: 1
 *       description: Intent example
 *       trainingPhrases:
 *         - parts:
 *             - text: training
 *             - text: phrase
 *             - text: example
 *           repeatCount: 1
 *       parameters:
 *         - id: param1
 *           entityType: projects/-/locations/-/agents/-/entityTypes/sys.date
 *       labels:
 *         label1: value1
 *         label2: value2
 * ```
 * 
 * ## Import
 * Intent can be imported using any of these accepted formats:
 * * `{{parent}}/intents/{{name}}`
 * * `{{parent}}/{{name}}`
 * When using the `pulumi import` command, Intent can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/intents/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/{{name}}
 * ```
 * @property description Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
 * @property displayName The human-readable name of the intent, unique within the agent.
 * - - -
 * @property isDefaultNegativeIntent Marks this as the [Default Negative Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#negative) for an agent. When you create an agent, a Default Negative Intent is created automatically.
 * The Default Negative Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
 * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_negative_intent = true` because they will compete to control a single Default Negative Intent resource in GCP.
 * @property isDefaultWelcomeIntent Marks this as the [Default Welcome Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#welcome) for an agent. When you create an agent, a Default Welcome Intent is created automatically.
 * The Default Welcome Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
 * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_welcome_intent = true` because they will compete to control a single Default Welcome Intent resource in GCP.
 * @property isFallback Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
 * Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
 * To manage the fallback intent, set `is_default_negative_intent = true`
 * @property labels The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes.
 * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent.
 * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property languageCode The language of the following fields in intent:
 * Intent.training_phrases.parts.text
 * If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
 * @property parameters The collection of parameters associated with the intent.
 * Structure is documented below.
 * @property parent The agent to create an intent for.
 * Format: projects//locations//agents/.
 * @property priority 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.
 * @property trainingPhrases The collection of training phrases the agent is trained on to identify the intent.
 * Structure is documented below.
 */
public data class CxIntentArgs(
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val isDefaultNegativeIntent: Output? = null,
    public val isDefaultWelcomeIntent: Output? = null,
    public val isFallback: Output? = null,
    public val labels: Output>? = null,
    public val languageCode: Output? = null,
    public val parameters: Output>? = null,
    public val parent: Output? = null,
    public val priority: Output? = null,
    public val trainingPhrases: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.diagflow.CxIntentArgs =
        com.pulumi.gcp.diagflow.CxIntentArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .isDefaultNegativeIntent(isDefaultNegativeIntent?.applyValue({ args0 -> args0 }))
            .isDefaultWelcomeIntent(isDefaultWelcomeIntent?.applyValue({ args0 -> args0 }))
            .isFallback(isFallback?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .languageCode(languageCode?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .parent(parent?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .trainingPhrases(
                trainingPhrases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [CxIntentArgs].
 */
@PulumiTagMarker
public class CxIntentArgsBuilder internal constructor() {
    private var description: Output? = null

    private var displayName: Output? = null

    private var isDefaultNegativeIntent: Output? = null

    private var isDefaultWelcomeIntent: Output? = null

    private var isFallback: Output? = null

    private var labels: Output>? = null

    private var languageCode: Output? = null

    private var parameters: Output>? = null

    private var parent: Output? = null

    private var priority: Output? = null

    private var trainingPhrases: Output>? = null

    /**
     * @param value Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
     */
    @JvmName("mgaxcfifodewtuvq")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The human-readable name of the intent, unique within the agent.
     * - - -
     */
    @JvmName("yjcbqgwvuhqcvodq")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Marks this as the [Default Negative Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#negative) for an agent. When you create an agent, a Default Negative Intent is created automatically.
     * The Default Negative Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
     * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_negative_intent = true` because they will compete to control a single Default Negative Intent resource in GCP.
     */
    @JvmName("bywrxrihutcilabm")
    public suspend fun isDefaultNegativeIntent(`value`: Output) {
        this.isDefaultNegativeIntent = value
    }

    /**
     * @param value Marks this as the [Default Welcome Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#welcome) for an agent. When you create an agent, a Default Welcome Intent is created automatically.
     * The Default Welcome Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
     * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_welcome_intent = true` because they will compete to control a single Default Welcome Intent resource in GCP.
     */
    @JvmName("xkfuvnwhxvejohcp")
    public suspend fun isDefaultWelcomeIntent(`value`: Output) {
        this.isDefaultWelcomeIntent = value
    }

    /**
     * @param value Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
     * Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
     * To manage the fallback intent, set `is_default_negative_intent = true`
     */
    @JvmName("tpigogiottagtnwn")
    public suspend fun isFallback(`value`: Output) {
        this.isFallback = value
    }

    /**
     * @param value The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes.
     * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent.
     * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("yrxukakrvnfuusqa")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The language of the following fields in intent:
     * Intent.training_phrases.parts.text
     * If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
     */
    @JvmName("pivgdgxolswfslch")
    public suspend fun languageCode(`value`: Output) {
        this.languageCode = value
    }

    /**
     * @param value The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("ehkuwrwcqdjwabik")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    @JvmName("dhkuhegsvxewntre")
    public suspend fun parameters(vararg values: Output) {
        this.parameters = Output.all(values.asList())
    }

    /**
     * @param values The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("xvvoawgtxqcpyprq")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value The agent to create an intent for.
     * Format: projects//locations//agents/.
     */
    @JvmName("kltblgpawkscvuxn")
    public suspend fun parent(`value`: Output) {
        this.parent = value
    }

    /**
     * @param value 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.
     */
    @JvmName("ekioknhevusvgoka")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("bwegvdikrwlxjnky")
    public suspend fun trainingPhrases(`value`: Output>) {
        this.trainingPhrases = value
    }

    @JvmName("ehxbegigsowhfoui")
    public suspend fun trainingPhrases(vararg values: Output) {
        this.trainingPhrases = Output.all(values.asList())
    }

    /**
     * @param values The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("drbdhsufgfqlfiep")
    public suspend fun trainingPhrases(values: List>) {
        this.trainingPhrases = Output.all(values)
    }

    /**
     * @param value Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
     */
    @JvmName("kqwmtvqggnqaidtt")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The human-readable name of the intent, unique within the agent.
     * - - -
     */
    @JvmName("oglpodbmutejikew")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Marks this as the [Default Negative Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#negative) for an agent. When you create an agent, a Default Negative Intent is created automatically.
     * The Default Negative Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
     * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_negative_intent = true` because they will compete to control a single Default Negative Intent resource in GCP.
     */
    @JvmName("cfwnjsanobaymvql")
    public suspend fun isDefaultNegativeIntent(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isDefaultNegativeIntent = mapped
    }

    /**
     * @param value Marks this as the [Default Welcome Intent](https://cloud.google.com/dialogflow/cx/docs/concept/intent#welcome) for an agent. When you create an agent, a Default Welcome Intent is created automatically.
     * The Default Welcome Intent cannot be deleted; deleting the `gcp.diagflow.CxIntent` resource does nothing to the underlying GCP resources.
     * > Avoid having multiple `gcp.diagflow.CxIntent` resources linked to the same agent with `is_default_welcome_intent = true` because they will compete to control a single Default Welcome Intent resource in GCP.
     */
    @JvmName("rvxlscpuailkjhjv")
    public suspend fun isDefaultWelcomeIntent(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isDefaultWelcomeIntent = mapped
    }

    /**
     * @param value Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
     * Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
     * To manage the fallback intent, set `is_default_negative_intent = true`
     */
    @JvmName("gsosacvnjccgschb")
    public suspend fun isFallback(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isFallback = mapped
    }

    /**
     * @param value The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes.
     * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent.
     * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("equrirdmngfqhycm")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes.
     * Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent.
     * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("abmhqergdwqqfhgk")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The language of the following fields in intent:
     * Intent.training_phrases.parts.text
     * If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
     */
    @JvmName("ebcmeawvalrrvtmh")
    public suspend fun languageCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.languageCode = mapped
    }

    /**
     * @param value The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("gwjyucsagefoejrf")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("wrdrustixcaaykyq")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxIntentParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("pijyknfwswmmbxwv")
    public suspend fun parameters(vararg argument: suspend CxIntentParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxIntentParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("lrarxxhaxfbkfrlk")
    public suspend fun parameters(argument: suspend CxIntentParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CxIntentParameterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values The collection of parameters associated with the intent.
     * Structure is documented below.
     */
    @JvmName("kdebhakqfjqujnvp")
    public suspend fun parameters(vararg values: CxIntentParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The agent to create an intent for.
     * Format: projects//locations//agents/.
     */
    @JvmName("jyvtjdocwioyiten")
    public suspend fun parent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parent = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("mkgtmpqjmhyeegqy")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("uqshbijyxwvsrftg")
    public suspend fun trainingPhrases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trainingPhrases = mapped
    }

    /**
     * @param argument The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("xkgvaqfqgmbisntq")
    public suspend fun trainingPhrases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxIntentTrainingPhraseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.trainingPhrases = mapped
    }

    /**
     * @param argument The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("ouodgllpktuskjkm")
    public suspend fun trainingPhrases(vararg argument: suspend CxIntentTrainingPhraseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxIntentTrainingPhraseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.trainingPhrases = mapped
    }

    /**
     * @param argument The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("qsppsqpfpqpkthdt")
    public suspend fun trainingPhrases(argument: suspend CxIntentTrainingPhraseArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CxIntentTrainingPhraseArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.trainingPhrases = mapped
    }

    /**
     * @param values The collection of training phrases the agent is trained on to identify the intent.
     * Structure is documented below.
     */
    @JvmName("xnhrfyplygbvnjbd")
    public suspend fun trainingPhrases(vararg values: CxIntentTrainingPhraseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.trainingPhrases = mapped
    }

    internal fun build(): CxIntentArgs = CxIntentArgs(
        description = description,
        displayName = displayName,
        isDefaultNegativeIntent = isDefaultNegativeIntent,
        isDefaultWelcomeIntent = isDefaultWelcomeIntent,
        isFallback = isFallback,
        labels = labels,
        languageCode = languageCode,
        parameters = parameters,
        parent = parent,
        priority = priority,
        trainingPhrases = trainingPhrases,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy