...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/scripts/resource-autogen/generated/samples/DialogflowCX-DialogflowCXFlow-dialogflowcx_flow_full/main.tf

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/scripts/resource-autogen/generated/samples/DialogflowCX-DialogflowCXFlow-dialogflowcx_flow_full

     1/**
     2 * Copyright 2022 Google LLC
     3 *
     4 * Licensed under the Apache License, Version 2.0 (the "License");
     5 * you may not use this file except in compliance with the License.
     6 * You may obtain a copy of the License at
     7 *
     8 *      http://www.apache.org/licenses/LICENSE-2.0
     9 *
    10 * Unless required by applicable law or agreed to in writing, software
    11 * distributed under the License is distributed on an "AS IS" BASIS,
    12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13 * See the License for the specific language governing permissions and
    14 * limitations under the License.
    15 */
    16
    17```hcl
    18resource "google_dialogflow_cx_agent" "agent" {
    19  display_name = "dialogflowcx-agent"
    20  location = "global"
    21  default_language_code = "en"
    22  supported_language_codes = ["fr","de","es"]
    23  time_zone = "America/New_York"
    24  description = "Example description."
    25  avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
    26  enable_stackdriver_logging = true
    27  enable_spell_correction    = true
    28	speech_to_text_settings {
    29		enable_speech_adaptation = true
    30	}
    31}
    32
    33
    34resource "google_dialogflow_cx_flow" "basic_flow" {
    35  parent       = google_dialogflow_cx_agent.agent.id
    36  display_name = "MyFlow"
    37  description  = "Test Flow"
    38
    39  nlu_settings {
    40		classification_threshold = 0.3 
    41		model_type               = "MODEL_TYPE_STANDARD"
    42	}
    43
    44  event_handlers {
    45		   event                    = "custom-event"
    46		   trigger_fulfillment {
    47			    return_partial_responses = false
    48				messages {
    49					text {
    50						text  = ["I didn't get that. Can you say it again?"]
    51					}
    52				}
    53		    }
    54		}
    55
    56		event_handlers {
    57			event                    = "sys.no-match-default"
    58			trigger_fulfillment {
    59				 return_partial_responses = false
    60				 messages {
    61					 text {
    62						 text  = ["Sorry, could you say that again?"]
    63					 }
    64				 }
    65			 }
    66		 }
    67
    68		 event_handlers {
    69			event                    = "sys.no-input-default"
    70			trigger_fulfillment {
    71				 return_partial_responses = false
    72				 messages {
    73					 text {
    74						 text  = ["One more time?"]
    75					 }
    76				 }
    77			 }
    78		 }
    79} 
    80```

View as plain text