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

com.pulumi.gcp.diagflow.kotlin.inputs.CxIntentTrainingPhraseArgs.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.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property id (Output)
 * The unique identifier of the training phrase.
 * @property parts The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
 * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
 * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
 * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
 * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
 * Part.text is set to a part of the phrase that has no parameters.
 * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
 * Structure is documented below.
 * @property repeatCount Indicates how many times this example was added to the intent.
 */
public data class CxIntentTrainingPhraseArgs(
    public val id: Output? = null,
    public val parts: Output>,
    public val repeatCount: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs =
        com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .parts(parts.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .repeatCount(repeatCount?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CxIntentTrainingPhraseArgs].
 */
@PulumiTagMarker
public class CxIntentTrainingPhraseArgsBuilder internal constructor() {
    private var id: Output? = null

    private var parts: Output>? = null

    private var repeatCount: Output? = null

    /**
     * @param value (Output)
     * The unique identifier of the training phrase.
     */
    @JvmName("picmmlbxnvwepcdh")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("ilarspsfdsrjwsop")
    public suspend fun parts(`value`: Output>) {
        this.parts = value
    }

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

    /**
     * @param values The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("qvcnlenseprgtwvp")
    public suspend fun parts(values: List>) {
        this.parts = Output.all(values)
    }

    /**
     * @param value Indicates how many times this example was added to the intent.
     */
    @JvmName("lsroofdcmmfyebkd")
    public suspend fun repeatCount(`value`: Output) {
        this.repeatCount = value
    }

    /**
     * @param value (Output)
     * The unique identifier of the training phrase.
     */
    @JvmName("oaormwnwudphswcf")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("aibxgilwabpjnsxk")
    public suspend fun parts(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parts = mapped
    }

    /**
     * @param argument The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("grismqetpyfxxude")
    public suspend fun parts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxIntentTrainingPhrasePartArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parts = mapped
    }

    /**
     * @param argument The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("kfmbiyrryemrvffd")
    public suspend fun parts(vararg argument: suspend CxIntentTrainingPhrasePartArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxIntentTrainingPhrasePartArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parts = mapped
    }

    /**
     * @param argument The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("hmjemaciasmrbpra")
    public suspend fun parts(argument: suspend CxIntentTrainingPhrasePartArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CxIntentTrainingPhrasePartArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.parts = mapped
    }

    /**
     * @param values The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
     * Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
     * Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
     * If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set.
     * If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
     * Part.text is set to a part of the phrase that has no parameters.
     * Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set.
     * Structure is documented below.
     */
    @JvmName("vkeiinrntjgnpisj")
    public suspend fun parts(vararg values: CxIntentTrainingPhrasePartArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parts = mapped
    }

    /**
     * @param value Indicates how many times this example was added to the intent.
     */
    @JvmName("yutakecawlqhsswk")
    public suspend fun repeatCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repeatCount = mapped
    }

    internal fun build(): CxIntentTrainingPhraseArgs = CxIntentTrainingPhraseArgs(
        id = id,
        parts = parts ?: throw PulumiNullFieldException("parts"),
        repeatCount = repeatCount,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy