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

com.pulumi.gcp.diagflow.kotlin.CxAgentArgs.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.10.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.CxAgentArgs.builder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentAdvancedSettingsArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentAdvancedSettingsArgsBuilder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentGitIntegrationSettingsArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentGitIntegrationSettingsArgsBuilder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentSpeechToTextSettingsArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentSpeechToTextSettingsArgsBuilder
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentTextToSpeechSettingsArgs
import com.pulumi.gcp.diagflow.kotlin.inputs.CxAgentTextToSpeechSettingsArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.
 * To get more information about Agent, see:
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 * ## Example Usage
 * ### Dialogflowcx Agent Full
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const bucket = new gcp.storage.Bucket("bucket", {
 *     name: "dialogflowcx-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const fullAgent = new gcp.diagflow.CxAgent("full_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,
 *     },
 *     advancedSettings: {
 *         audioExportGcsDestination: {
 *             uri: pulumi.interpolate`${bucket.url}/prefix-`,
 *         },
 *         dtmfSettings: {
 *             enabled: true,
 *             maxDigits: 1,
 *             finishDigit: "#",
 *         },
 *     },
 *     gitIntegrationSettings: {
 *         githubSettings: {
 *             displayName: "Github Repo",
 *             repositoryUri: "https://api.github.com/repos/githubtraining/hellogitworld",
 *             trackingBranch: "main",
 *             accessToken: "secret-token",
 *             branches: ["main"],
 *         },
 *     },
 *     textToSpeechSettings: {
 *         synthesizeSpeechConfigs: JSON.stringify({
 *             en: {
 *                 voice: {
 *                     name: "en-US-Neural2-A",
 *                 },
 *             },
 *             fr: {
 *                 voice: {
 *                     name: "fr-CA-Neural2-A",
 *                 },
 *             },
 *         }),
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_gcp as gcp
 * bucket = gcp.storage.Bucket("bucket",
 *     name="dialogflowcx-bucket",
 *     location="US",
 *     uniform_bucket_level_access=True)
 * full_agent = gcp.diagflow.CxAgent("full_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,
 *     ),
 *     advanced_settings=gcp.diagflow.CxAgentAdvancedSettingsArgs(
 *         audio_export_gcs_destination=gcp.diagflow.CxAgentAdvancedSettingsAudioExportGcsDestinationArgs(
 *             uri=bucket.url.apply(lambda url: f"{url}/prefix-"),
 *         ),
 *         dtmf_settings=gcp.diagflow.CxAgentAdvancedSettingsDtmfSettingsArgs(
 *             enabled=True,
 *             max_digits=1,
 *             finish_digit="#",
 *         ),
 *     ),
 *     git_integration_settings=gcp.diagflow.CxAgentGitIntegrationSettingsArgs(
 *         github_settings=gcp.diagflow.CxAgentGitIntegrationSettingsGithubSettingsArgs(
 *             display_name="Github Repo",
 *             repository_uri="https://api.github.com/repos/githubtraining/hellogitworld",
 *             tracking_branch="main",
 *             access_token="secret-token",
 *             branches=["main"],
 *         ),
 *     ),
 *     text_to_speech_settings=gcp.diagflow.CxAgentTextToSpeechSettingsArgs(
 *         synthesize_speech_configs=json.dumps({
 *             "en": {
 *                 "voice": {
 *                     "name": "en-US-Neural2-A",
 *                 },
 *             },
 *             "fr": {
 *                 "voice": {
 *                     "name": "fr-CA-Neural2-A",
 *                 },
 *             },
 *         }),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var bucket = new Gcp.Storage.Bucket("bucket", new()
 *     {
 *         Name = "dialogflowcx-bucket",
 *         Location = "US",
 *         UniformBucketLevelAccess = true,
 *     });
 *     var fullAgent = new Gcp.Diagflow.CxAgent("full_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,
 *         },
 *         AdvancedSettings = new Gcp.Diagflow.Inputs.CxAgentAdvancedSettingsArgs
 *         {
 *             AudioExportGcsDestination = new Gcp.Diagflow.Inputs.CxAgentAdvancedSettingsAudioExportGcsDestinationArgs
 *             {
 *                 Uri = bucket.Url.Apply(url => $"{url}/prefix-"),
 *             },
 *             DtmfSettings = new Gcp.Diagflow.Inputs.CxAgentAdvancedSettingsDtmfSettingsArgs
 *             {
 *                 Enabled = true,
 *                 MaxDigits = 1,
 *                 FinishDigit = "#",
 *             },
 *         },
 *         GitIntegrationSettings = new Gcp.Diagflow.Inputs.CxAgentGitIntegrationSettingsArgs
 *         {
 *             GithubSettings = new Gcp.Diagflow.Inputs.CxAgentGitIntegrationSettingsGithubSettingsArgs
 *             {
 *                 DisplayName = "Github Repo",
 *                 RepositoryUri = "https://api.github.com/repos/githubtraining/hellogitworld",
 *                 TrackingBranch = "main",
 *                 AccessToken = "secret-token",
 *                 Branches = new[]
 *                 {
 *                     "main",
 *                 },
 *             },
 *         },
 *         TextToSpeechSettings = new Gcp.Diagflow.Inputs.CxAgentTextToSpeechSettingsArgs
 *         {
 *             SynthesizeSpeechConfigs = JsonSerializer.Serialize(new Dictionary
 *             {
 *                 ["en"] = new Dictionary
 *                 {
 *                     ["voice"] = new Dictionary
 *                     {
 *                         ["name"] = "en-US-Neural2-A",
 *                     },
 *                 },
 *                 ["fr"] = new Dictionary
 *                 {
 *                     ["voice"] = new Dictionary
 *                     {
 *                         ["name"] = "fr-CA-Neural2-A",
 *                     },
 *                 },
 *             }),
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
 * 			Name:                     pulumi.String("dialogflowcx-bucket"),
 * 			Location:                 pulumi.String("US"),
 * 			UniformBucketLevelAccess: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"en": map[string]interface{}{
 * 				"voice": map[string]interface{}{
 * 					"name": "en-US-Neural2-A",
 * 				},
 * 			},
 * 			"fr": map[string]interface{}{
 * 				"voice": map[string]interface{}{
 * 					"name": "fr-CA-Neural2-A",
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		_, err = diagflow.NewCxAgent(ctx, "full_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),
 * 			},
 * 			AdvancedSettings: &diagflow.CxAgentAdvancedSettingsArgs{
 * 				AudioExportGcsDestination: &diagflow.CxAgentAdvancedSettingsAudioExportGcsDestinationArgs{
 * 					Uri: bucket.Url.ApplyT(func(url string) (string, error) {
 * 						return fmt.Sprintf("%v/prefix-", url), nil
 * 					}).(pulumi.StringOutput),
 * 				},
 * 				DtmfSettings: &diagflow.CxAgentAdvancedSettingsDtmfSettingsArgs{
 * 					Enabled:     pulumi.Bool(true),
 * 					MaxDigits:   pulumi.Int(1),
 * 					FinishDigit: pulumi.String("#"),
 * 				},
 * 			},
 * 			GitIntegrationSettings: &diagflow.CxAgentGitIntegrationSettingsArgs{
 * 				GithubSettings: &diagflow.CxAgentGitIntegrationSettingsGithubSettingsArgs{
 * 					DisplayName:    pulumi.String("Github Repo"),
 * 					RepositoryUri:  pulumi.String("https://api.github.com/repos/githubtraining/hellogitworld"),
 * 					TrackingBranch: pulumi.String("main"),
 * 					AccessToken:    pulumi.String("secret-token"),
 * 					Branches: pulumi.StringArray{
 * 						pulumi.String("main"),
 * 					},
 * 				},
 * 			},
 * 			TextToSpeechSettings: &diagflow.CxAgentTextToSpeechSettingsArgs{
 * 				SynthesizeSpeechConfigs: pulumi.String(json0),
 * 			},
 * 		})
 * 		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.storage.Bucket;
 * import com.pulumi.gcp.storage.BucketArgs;
 * import com.pulumi.gcp.diagflow.CxAgent;
 * import com.pulumi.gcp.diagflow.CxAgentArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsAudioExportGcsDestinationArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsDtmfSettingsArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentGitIntegrationSettingsArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentGitIntegrationSettingsGithubSettingsArgs;
 * import com.pulumi.gcp.diagflow.inputs.CxAgentTextToSpeechSettingsArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 bucket = new Bucket("bucket", BucketArgs.builder()
 *             .name("dialogflowcx-bucket")
 *             .location("US")
 *             .uniformBucketLevelAccess(true)
 *             .build());
 *         var fullAgent = new CxAgent("fullAgent", 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())
 *             .advancedSettings(CxAgentAdvancedSettingsArgs.builder()
 *                 .audioExportGcsDestination(CxAgentAdvancedSettingsAudioExportGcsDestinationArgs.builder()
 *                     .uri(bucket.url().applyValue(url -> String.format("%s/prefix-", url)))
 *                     .build())
 *                 .dtmfSettings(CxAgentAdvancedSettingsDtmfSettingsArgs.builder()
 *                     .enabled(true)
 *                     .maxDigits(1)
 *                     .finishDigit("#")
 *                     .build())
 *                 .build())
 *             .gitIntegrationSettings(CxAgentGitIntegrationSettingsArgs.builder()
 *                 .githubSettings(CxAgentGitIntegrationSettingsGithubSettingsArgs.builder()
 *                     .displayName("Github Repo")
 *                     .repositoryUri("https://api.github.com/repos/githubtraining/hellogitworld")
 *                     .trackingBranch("main")
 *                     .accessToken("secret-token")
 *                     .branches("main")
 *                     .build())
 *                 .build())
 *             .textToSpeechSettings(CxAgentTextToSpeechSettingsArgs.builder()
 *                 .synthesizeSpeechConfigs(serializeJson(
 *                     jsonObject(
 *                         jsonProperty("en", jsonObject(
 *                             jsonProperty("voice", jsonObject(
 *                                 jsonProperty("name", "en-US-Neural2-A")
 *                             ))
 *                         )),
 *                         jsonProperty("fr", jsonObject(
 *                             jsonProperty("voice", jsonObject(
 *                                 jsonProperty("name", "fr-CA-Neural2-A")
 *                             ))
 *                         ))
 *                     )))
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   bucket:
 *     type: gcp:storage:Bucket
 *     properties:
 *       name: dialogflowcx-bucket
 *       location: US
 *       uniformBucketLevelAccess: true
 *   fullAgent:
 *     type: gcp:diagflow:CxAgent
 *     name: full_agent
 *     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
 *       advancedSettings:
 *         audioExportGcsDestination:
 *           uri: ${bucket.url}/prefix-
 *         dtmfSettings:
 *           enabled: true
 *           maxDigits: 1
 *           finishDigit: '#'
 *       gitIntegrationSettings:
 *         githubSettings:
 *           displayName: Github Repo
 *           repositoryUri: https://api.github.com/repos/githubtraining/hellogitworld
 *           trackingBranch: main
 *           accessToken: secret-token
 *           branches:
 *             - main
 *       textToSpeechSettings:
 *         synthesizeSpeechConfigs:
 *           fn::toJSON:
 *             en:
 *               voice:
 *                 name: en-US-Neural2-A
 *             fr:
 *               voice:
 *                 name: fr-CA-Neural2-A
 * ```
 * 
 * ## Import
 * Agent can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/agents/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, Agent can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:diagflow/cxAgent:CxAgent default projects/{{project}}/locations/{{location}}/agents/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:diagflow/cxAgent:CxAgent default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:diagflow/cxAgent:CxAgent default {{location}}/{{name}}
 * ```
 * @property advancedSettings Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
 * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
 * Structure is documented below.
 * @property avatarUri The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
 * @property defaultLanguageCode The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
 * for a list of the currently supported language codes. This field cannot be updated after creation.
 * @property description The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
 * @property displayName The human-readable name of the agent, unique within the location.
 * @property enableSpellCorrection Indicates if automatic spell correction is enabled in detect intent requests.
 * @property enableStackdriverLogging Determines whether this agent should log conversation queries.
 * @property gitIntegrationSettings Git integration settings for this agent.
 * Structure is documented below.
 * @property location The name of the location this agent is located in.
 * > **Note:** The first time you are deploying an Agent in your project you must configure location settings.
 * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console.
 * Another options is to use global location so you don't need to manually configure location settings.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property securitySettings Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.
 * @property speechToTextSettings Settings related to speech recognition.
 * Structure is documented below.
 * @property supportedLanguageCodes The list of all languages supported by this agent (except for the default_language_code).
 * @property textToSpeechSettings Settings related to speech synthesizing.
 * Structure is documented below.
 * @property timeZone The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York,
 * Europe/Paris.
 * - - -
 */
public data class CxAgentArgs(
    public val advancedSettings: Output? = null,
    public val avatarUri: Output? = null,
    public val defaultLanguageCode: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val enableSpellCorrection: Output? = null,
    public val enableStackdriverLogging: Output? = null,
    public val gitIntegrationSettings: Output? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val securitySettings: Output? = null,
    public val speechToTextSettings: Output? = null,
    public val supportedLanguageCodes: Output>? = null,
    public val textToSpeechSettings: Output? = null,
    public val timeZone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.diagflow.CxAgentArgs =
        com.pulumi.gcp.diagflow.CxAgentArgs.builder()
            .advancedSettings(advancedSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .avatarUri(avatarUri?.applyValue({ args0 -> args0 }))
            .defaultLanguageCode(defaultLanguageCode?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .enableSpellCorrection(enableSpellCorrection?.applyValue({ args0 -> args0 }))
            .enableStackdriverLogging(enableStackdriverLogging?.applyValue({ args0 -> args0 }))
            .gitIntegrationSettings(
                gitIntegrationSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .securitySettings(securitySettings?.applyValue({ args0 -> args0 }))
            .speechToTextSettings(
                speechToTextSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .supportedLanguageCodes(
                supportedLanguageCodes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .textToSpeechSettings(
                textToSpeechSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CxAgentArgs].
 */
@PulumiTagMarker
public class CxAgentArgsBuilder internal constructor() {
    private var advancedSettings: Output? = null

    private var avatarUri: Output? = null

    private var defaultLanguageCode: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var enableSpellCorrection: Output? = null

    private var enableStackdriverLogging: Output? = null

    private var gitIntegrationSettings: Output? = null

    private var location: Output? = null

    private var project: Output? = null

    private var securitySettings: Output? = null

    private var speechToTextSettings: Output? = null

    private var supportedLanguageCodes: Output>? = null

    private var textToSpeechSettings: Output? = null

    private var timeZone: Output? = null

    /**
     * @param value Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
     * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
     * Structure is documented below.
     */
    @JvmName("nrkdldpquroggvny")
    public suspend fun advancedSettings(`value`: Output) {
        this.advancedSettings = value
    }

    /**
     * @param value The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
     */
    @JvmName("tgnbqqmkskpnbahw")
    public suspend fun avatarUri(`value`: Output) {
        this.avatarUri = value
    }

    /**
     * @param value The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
     * for a list of the currently supported language codes. This field cannot be updated after creation.
     */
    @JvmName("xrpxtmjobifstvwk")
    public suspend fun defaultLanguageCode(`value`: Output) {
        this.defaultLanguageCode = value
    }

    /**
     * @param value The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
     */
    @JvmName("rcoflonvbglyiwkv")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

    /**
     * @param value Indicates if automatic spell correction is enabled in detect intent requests.
     */
    @JvmName("dqvtqdiryierntse")
    public suspend fun enableSpellCorrection(`value`: Output) {
        this.enableSpellCorrection = value
    }

    /**
     * @param value Determines whether this agent should log conversation queries.
     */
    @JvmName("wiyxvykqvvvibovv")
    public suspend fun enableStackdriverLogging(`value`: Output) {
        this.enableStackdriverLogging = value
    }

    /**
     * @param value Git integration settings for this agent.
     * Structure is documented below.
     */
    @JvmName("oceqkccqlelacnvg")
    public suspend fun gitIntegrationSettings(`value`: Output) {
        this.gitIntegrationSettings = value
    }

    /**
     * @param value The name of the location this agent is located in.
     * > **Note:** The first time you are deploying an Agent in your project you must configure location settings.
     * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console.
     * Another options is to use global location so you don't need to manually configure location settings.
     */
    @JvmName("hqhucdotpvgubsij")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("rxfobbcepmrpuynw")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.
     */
    @JvmName("orgmpohptycndopl")
    public suspend fun securitySettings(`value`: Output) {
        this.securitySettings = value
    }

    /**
     * @param value Settings related to speech recognition.
     * Structure is documented below.
     */
    @JvmName("kjtsgnqakoxwoajs")
    public suspend fun speechToTextSettings(`value`: Output) {
        this.speechToTextSettings = value
    }

    /**
     * @param value The list of all languages supported by this agent (except for the default_language_code).
     */
    @JvmName("thvmhjpmvrpcwysg")
    public suspend fun supportedLanguageCodes(`value`: Output>) {
        this.supportedLanguageCodes = value
    }

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

    /**
     * @param values The list of all languages supported by this agent (except for the default_language_code).
     */
    @JvmName("duxhjwblokaycauk")
    public suspend fun supportedLanguageCodes(values: List>) {
        this.supportedLanguageCodes = Output.all(values)
    }

    /**
     * @param value Settings related to speech synthesizing.
     * Structure is documented below.
     */
    @JvmName("kvrkvgenrgpcosqu")
    public suspend fun textToSpeechSettings(`value`: Output) {
        this.textToSpeechSettings = value
    }

    /**
     * @param value The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York,
     * Europe/Paris.
     * - - -
     */
    @JvmName("oahnknibkehgwllq")
    public suspend fun timeZone(`value`: Output) {
        this.timeZone = value
    }

    /**
     * @param value Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
     * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
     * Structure is documented below.
     */
    @JvmName("hyvextlphwisgppw")
    public suspend fun advancedSettings(`value`: CxAgentAdvancedSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedSettings = mapped
    }

    /**
     * @param argument Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
     * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
     * Structure is documented below.
     */
    @JvmName("wrgxcktjdleshbji")
    public suspend fun advancedSettings(argument: suspend CxAgentAdvancedSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = CxAgentAdvancedSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.advancedSettings = mapped
    }

    /**
     * @param value The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
     */
    @JvmName("hvvhkilslpokmqde")
    public suspend fun avatarUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avatarUri = mapped
    }

    /**
     * @param value The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
     * for a list of the currently supported language codes. This field cannot be updated after creation.
     */
    @JvmName("ceypktaqpewxuphl")
    public suspend fun defaultLanguageCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultLanguageCode = mapped
    }

    /**
     * @param value The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
     */
    @JvmName("kksuxhkbcshsyaed")
    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 agent, unique within the location.
     */
    @JvmName("aorpcsunjatdtpfo")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Indicates if automatic spell correction is enabled in detect intent requests.
     */
    @JvmName("ksubghronmywgrjy")
    public suspend fun enableSpellCorrection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableSpellCorrection = mapped
    }

    /**
     * @param value Determines whether this agent should log conversation queries.
     */
    @JvmName("rxgpjvmraqbrkhju")
    public suspend fun enableStackdriverLogging(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableStackdriverLogging = mapped
    }

    /**
     * @param value Git integration settings for this agent.
     * Structure is documented below.
     */
    @JvmName("siqighumwppnjebj")
    public suspend fun gitIntegrationSettings(`value`: CxAgentGitIntegrationSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gitIntegrationSettings = mapped
    }

    /**
     * @param argument Git integration settings for this agent.
     * Structure is documented below.
     */
    @JvmName("rsfkfgtsorvcioky")
    public suspend fun gitIntegrationSettings(argument: suspend CxAgentGitIntegrationSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = CxAgentGitIntegrationSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gitIntegrationSettings = mapped
    }

    /**
     * @param value The name of the location this agent is located in.
     * > **Note:** The first time you are deploying an Agent in your project you must configure location settings.
     * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console.
     * Another options is to use global location so you don't need to manually configure location settings.
     */
    @JvmName("vhahjfwncyjkvbpm")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("kclhjnskbrsbvjso")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.
     */
    @JvmName("egvfnaqsjxiemawo")
    public suspend fun securitySettings(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securitySettings = mapped
    }

    /**
     * @param value Settings related to speech recognition.
     * Structure is documented below.
     */
    @JvmName("pacnnjflyrfrvvwq")
    public suspend fun speechToTextSettings(`value`: CxAgentSpeechToTextSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.speechToTextSettings = mapped
    }

    /**
     * @param argument Settings related to speech recognition.
     * Structure is documented below.
     */
    @JvmName("jvatjgecofqoqbuu")
    public suspend fun speechToTextSettings(argument: suspend CxAgentSpeechToTextSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = CxAgentSpeechToTextSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.speechToTextSettings = mapped
    }

    /**
     * @param value The list of all languages supported by this agent (except for the default_language_code).
     */
    @JvmName("eyutvbbsbvbnldqb")
    public suspend fun supportedLanguageCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.supportedLanguageCodes = mapped
    }

    /**
     * @param values The list of all languages supported by this agent (except for the default_language_code).
     */
    @JvmName("seoyoiggipvnyfdb")
    public suspend fun supportedLanguageCodes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.supportedLanguageCodes = mapped
    }

    /**
     * @param value Settings related to speech synthesizing.
     * Structure is documented below.
     */
    @JvmName("dghmneoyewctdoeo")
    public suspend fun textToSpeechSettings(`value`: CxAgentTextToSpeechSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.textToSpeechSettings = mapped
    }

    /**
     * @param argument Settings related to speech synthesizing.
     * Structure is documented below.
     */
    @JvmName("yfumyxakdheqeevn")
    public suspend fun textToSpeechSettings(argument: suspend CxAgentTextToSpeechSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = CxAgentTextToSpeechSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.textToSpeechSettings = mapped
    }

    /**
     * @param value The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York,
     * Europe/Paris.
     * - - -
     */
    @JvmName("terlopkeopqxitbu")
    public suspend fun timeZone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeZone = mapped
    }

    internal fun build(): CxAgentArgs = CxAgentArgs(
        advancedSettings = advancedSettings,
        avatarUri = avatarUri,
        defaultLanguageCode = defaultLanguageCode,
        description = description,
        displayName = displayName,
        enableSpellCorrection = enableSpellCorrection,
        enableStackdriverLogging = enableStackdriverLogging,
        gitIntegrationSettings = gitIntegrationSettings,
        location = location,
        project = project,
        securitySettings = securitySettings,
        speechToTextSettings = speechToTextSettings,
        supportedLanguageCodes = supportedLanguageCodes,
        textToSpeechSettings = textToSpeechSettings,
        timeZone = timeZone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy