CxIntentArgs

data class CxIntentArgs(val description: Output<String>? = null, val displayName: Output<String>? = null, val isFallback: Output<Boolean>? = null, val labels: Output<Map<String, String>>? = null, val languageCode: Output<String>? = null, val parameters: Output<List<CxIntentParameterArgs>>? = null, val parent: Output<String>? = null, val priority: Output<Int>? = null, val trainingPhrases: Output<List<CxIntentTrainingPhraseArgs>>? = null) : ConvertibleToJava<CxIntentArgs>

An intent represents a user's intent to interact with a conversational agent. To get more information about Intent, see:

Example Usage

Dialogflowcx Intent Full

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());
}
}

Import

Intent can be imported using any of these accepted formats

$ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/intents/{{name}}
$ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/{{name}}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, displayName: Output<String>? = null, isFallback: Output<Boolean>? = null, labels: Output<Map<String, String>>? = null, languageCode: Output<String>? = null, parameters: Output<List<CxIntentParameterArgs>>? = null, parent: Output<String>? = null, priority: Output<Int>? = null, trainingPhrases: Output<List<CxIntentTrainingPhraseArgs>>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

Link copied to clipboard
val displayName: Output<String>? = null

The human-readable name of the intent, unique within the agent.

Link copied to clipboard
val isFallback: Output<Boolean>? = null

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.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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" }.

Link copied to clipboard
val languageCode: Output<String>? = null

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.

Link copied to clipboard
val parameters: Output<List<CxIntentParameterArgs>>? = null

The collection of parameters associated with the intent. Structure is documented below.

Link copied to clipboard
val parent: Output<String>? = null

The agent to create an intent for. Format: projects//locations//agents/.

Link copied to clipboard
val priority: Output<Int>? = null

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.

Link copied to clipboard

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): CxIntentArgs