diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto index 41c783e98bd..13368d0a90e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -160,7 +160,7 @@ message Agent { // Immutable. The default language of the agent as a language tag. // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) // for a list of the currently supported language codes. // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] method. string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE]; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto index dd97ad933f0..dc9c911b93f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -250,6 +250,22 @@ message SynthesizeSpeechConfig { VoiceSelectionParams voice = 4; } +// Instructs the speech synthesizer how to generate the output audio content. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Optional. Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} + // Gender of the voice as described in // [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). enum SsmlVoiceGender { @@ -267,22 +283,6 @@ enum SsmlVoiceGender { SSML_VOICE_GENDER_NEUTRAL = 3; } -// Instructs the speech synthesizer how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The synthesis sample rate (in hertz) for this audio. If not - // provided, then the synthesizer will use the default sample rate based on - // the audio encoding. If this is different from the voice's natural sample - // rate, then the synthesizer will honor this request by converting to the - // desired sample rate (which might result in worse audio quality). - int32 sample_rate_hertz = 2; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - // Audio encoding of the output audio format in Text-To-Speech. enum OutputAudioEncoding { // Not specified. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto index 3e7f4e36117..715dcb87573 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -231,7 +231,7 @@ message ListEntityTypesRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -276,7 +276,7 @@ message GetEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -304,7 +304,7 @@ message CreateEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -323,7 +323,7 @@ message UpdateEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto index 962e6a856e7..e04f1b9baa3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto index 712fcf4041c..399ec1c27dc 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto index 46c987160a9..7560e77a442 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -250,7 +250,7 @@ message CreateFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -307,7 +307,7 @@ message ListFlowsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 4; @@ -344,7 +344,7 @@ message GetFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -366,7 +366,7 @@ message UpdateFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto index 91181c727ed..0f04f68362c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto index 519cbd09d2c..1e2924ff814 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -236,7 +236,7 @@ message ListIntentsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -282,7 +282,7 @@ message GetIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -308,7 +308,7 @@ message CreateIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -325,7 +325,7 @@ message UpdateIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto index 213dc8b1307..fadede1ae56 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -150,6 +150,9 @@ message Page { // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with intent // specified. // * TransitionRoutes defined in flow with intent specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + // specified. // * TransitionRoutes defined in the page with only condition specified. // * TransitionRoutes defined in the // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only @@ -383,7 +386,7 @@ message ListPagesRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -431,7 +434,7 @@ message GetPageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -463,7 +466,7 @@ message CreatePageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -485,7 +488,7 @@ message UpdatePageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto index 29094abdb5d..53b720a6746 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -113,6 +113,13 @@ message ResponseMessage { bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Indicates that interaction with the Dialogflow agent has ended. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message EndInteraction { + + } + // Specifies an audio clip to be played by the client as part of the response. message PlayAudio { // Required. URI of the audio clip. Dialogflow does not impose any validation on this @@ -125,13 +132,6 @@ message ResponseMessage { bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Indicates that interaction with the Dialogflow agent has ended. - // This message is generated by Dialogflow only and not supposed to be - // defined by the user. - message EndInteraction { - - } - // Represents an audio message that is composed of both segments // synthesized from the Dialogflow agent prompts and ones hosted externally // at the specified URIs. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto index 4427effde06..a5154bdd245 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto index 55de80b91f4..a013a0f623e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -433,9 +433,9 @@ message QueryInput { } // Required. The language of the input. See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) for a - // list of the currently supported language codes. Note that queries in the - // same session do not necessarily need to specify the same language. + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. string language_code = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -462,7 +462,7 @@ message QueryResult { // The language that was triggered during intent detection. // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) // for a list of the currently supported language codes. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto index e7b327f2487..8500bd03bc0 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto index 3707cc3adf8..baa1aff62cd 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3/intent.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; import "google/cloud/dialogflow/cx/v3/session.proto"; +import "google/cloud/dialogflow/cx/v3/transition_route_group.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -94,7 +95,7 @@ service TestCases { // Kicks off a test case run. rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v3/projects/*/locations/*/agents/*/testCases:run" + post: "/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run" body: "*" }; option (google.longrunning.operation_info) = { @@ -277,12 +278,12 @@ message ConversationTurn { (google.api.field_behavior) = INPUT_ONLY ]; - // The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only some fields such as - // name and displayname will be set. + // The [Intent][google.cloud.dialogflow.cx.v3.Intent] that triggered the response. Only name and displayName + // will be set. Intent triggered_intent = 7; - // The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only some fields such as - // name and displayname will be set. + // The [Page][google.cloud.dialogflow.cx.v3.Page] on which the utterance was spoken. Only name and displayName + // will be set. Page current_page = 8; // The [text][google.cloud.dialogflow.cx.v3.ResponseMessage.Text] responses from the agent for the turn. @@ -327,8 +328,9 @@ message TestRunDifference { string description = 2; } -// Transition coverage represents the percentage of all possible transitions -// present within any of a parent's test cases. +// Transition coverage represents the percentage of all possible page +// transitions (page-level transition routes and event handlers, excluding +// transition route groups) present within any of a parent's test cases. message TransitionCoverage { // The source or target of a transition. message TransitionNode { @@ -344,7 +346,7 @@ message TransitionCoverage { } } - // A transition in the agent's graph. + // A transition in a page. message Transition { // The start node of a transition. TransitionNode source = 1; @@ -376,6 +378,41 @@ message TransitionCoverage { float coverage_score = 2; } +// Transition route group coverage represents the percentage of all possible +// transition routes present within any of a parent's test cases. The results +// are grouped by the transition route group. +message TransitionRouteGroupCoverage { + // Coverage result message for one transition route group. + message Coverage { + // A transition coverage in a transition route group. + message Transition { + // Intent route or condition route. + TransitionRoute transition_route = 1; + + // Whether or not the transition route is covered by at least one of the + // agent's test cases. + bool covered = 2; + } + + // Transition route group metadata. Only name and displayName will be set. + TransitionRouteGroup route_group = 1; + + // The list of transition routes and coverage in the transition route group. + repeated Transition transitions = 2; + + // The percent of transition routes in the transition route group that are + // covered. + float coverage_score = 3; + } + + // Transition route group coverages. + repeated Coverage coverages = 1; + + // The percent of transition routes in all the transition route groups that + // are covered. + float coverage_score = 2; +} + // Intent coverage represents the percentage of all possible intents in the // agent that are triggered in any of a parent's test cases. message IntentCoverage { @@ -408,8 +445,11 @@ message CalculateCoverageRequest { // Intent coverage. INTENT = 1; - // Page transition coverage + // Page transition coverage. PAGE_TRANSITION = 2; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; } // Required. The agent to calculate coverage for. @@ -438,8 +478,11 @@ message CalculateCoverageResponse { // Intent coverage. IntentCoverage intent_coverage = 2; - // Transition coverage. + // Transition (excluding transition route groups) coverage. TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; } } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 8f1f9debd0b..1f5911955ab 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -130,7 +130,7 @@ message ListTransitionRouteGroupsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 4; @@ -167,7 +167,7 @@ message GetTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -194,7 +194,7 @@ message CreateTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -214,7 +214,7 @@ message UpdateTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto index 8f98efae3f5..f36c9bb9d1d 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto index 3850fd26d40..a3a99202505 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto index 664f6d06da6..eb086364224 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -273,6 +273,18 @@ message WebhookRequest { float confidence = 4; } + // Represents the result of sentiment analysis. + message SentimentAnalysisResult { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the + // absolute magnitude of sentiment, regardless of score (positive or + // negative). + float magnitude = 2; + } + // Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that // will be returned to the API caller. string detect_intent_response_id = 1; @@ -297,6 +309,10 @@ message WebhookRequest { // Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload]. google.protobuf.Struct payload = 8; + + // The sentiment analysis result of the current user request. The field is + // filled when sentiment analysis is configured to be enabled for the request. + SentimentAnalysisResult sentiment_analysis_result = 9; } // The response message for a webhook call. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index f6fb4b42481..543dfff5020 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -161,7 +161,7 @@ message Agent { // Immutable. The default language of the agent as a language tag. // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) // for a list of the currently supported language codes. // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE]; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index c6a1b020168..38f05bd5219 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -249,6 +249,22 @@ message SynthesizeSpeechConfig { VoiceSelectionParams voice = 4; } +// Instructs the speech synthesizer how to generate the output audio content. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Optional. Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} + // Gender of the voice as described in // [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). enum SsmlVoiceGender { @@ -266,22 +282,6 @@ enum SsmlVoiceGender { SSML_VOICE_GENDER_NEUTRAL = 3; } -// Instructs the speech synthesizer how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The synthesis sample rate (in hertz) for this audio. If not - // provided, then the synthesizer will use the default sample rate based on - // the audio encoding. If this is different from the voice's natural sample - // rate, then the synthesizer will honor this request by converting to the - // desired sample rate (which might result in worse audio quality). - int32 sample_rate_hertz = 2; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} - // Audio encoding of the output audio format in Text-To-Speech. enum OutputAudioEncoding { // Not specified. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index e51d92f885e..8086a57588d 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -231,7 +231,7 @@ message ListEntityTypesRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -276,7 +276,7 @@ message GetEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -304,7 +304,7 @@ message CreateEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -323,7 +323,7 @@ message UpdateEntityTypeRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto index a5c444c3dce..feddb123a8a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto index f194943094b..7ae323b417f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto index e5aeef4ca9b..f8b92b5eb86 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -250,7 +250,7 @@ message CreateFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -307,7 +307,7 @@ message ListFlowsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 4; @@ -344,7 +344,7 @@ message GetFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -366,7 +366,7 @@ message UpdateFlowRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto index 7a8e5af3cba..74d9e822488 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto index c66df126641..c0479c472a2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -236,7 +236,7 @@ message ListIntentsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -282,7 +282,7 @@ message GetIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -308,7 +308,7 @@ message CreateIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -325,7 +325,7 @@ message UpdateIntentRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto index 94daf38a60e..4a8acf7a55f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -386,7 +386,7 @@ message ListPagesRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -434,7 +434,7 @@ message GetPageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -466,7 +466,7 @@ message CreatePageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -488,7 +488,7 @@ message UpdatePageRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 1627520eb4d..e8934f20d7a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -184,8 +184,8 @@ message ResponseMessage { // Output only. A signal that indicates the interaction with the Dialogflow agent has // ended. // This message is generated by Dialogflow only when the conversation - // reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - // defined by the user. + // reaches `END_SESSION` page. It is not supposed to be defined by the user. + // // It's guaranteed that there is at most one such message in each response. EndInteraction end_interaction = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index e86c99424c2..376a73188df 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 5e8f07aa4cd..4b650a044a7 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -388,6 +388,9 @@ message QueryParameters { // - Else: parameter value google.protobuf.Struct parameters = 5; + // Whether to disable webhook calls for this request. + bool disable_webhook = 7; + // Configures whether sentiment analysis should be performed. If not // provided, sentiment analysis is not performed. bool analyze_query_text_sentiment = 8; @@ -433,9 +436,9 @@ message QueryInput { } // Required. The language of the input. See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) for a - // list of the currently supported language codes. Note that queries in the - // same session do not necessarily need to specify the same language. + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. string language_code = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -462,7 +465,7 @@ message QueryResult { // The language that was triggered during intent detection. // See [Language - // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) // for a list of the currently supported language codes. string language_code = 2; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto index 5b8f5df929f..7bdd3ec3155 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto index 4a51377577a..05c07a27d81 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import "google/cloud/dialogflow/cx/v3beta1/intent.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/cloud/dialogflow/cx/v3beta1/session.proto"; +import "google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -94,7 +95,7 @@ service TestCases { // Kicks off a test case run. rpc RunTestCase(RunTestCaseRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v3beta1/projects/*/locations/*/agents/*/testCases:run" + post: "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*}:run" body: "*" }; option (google.longrunning.operation_info) = { @@ -277,12 +278,12 @@ message ConversationTurn { (google.api.field_behavior) = INPUT_ONLY ]; - // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only some fields such as - // name and displayname will be set. + // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName + // will be set. Intent triggered_intent = 7; - // The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only some fields such as - // name and displayname will be set. + // The [Page][google.cloud.dialogflow.cx.v3beta1.Page] on which the utterance was spoken. Only name and displayName + // will be set. Page current_page = 8; // The [text][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text] responses from the agent for the turn. @@ -327,8 +328,9 @@ message TestRunDifference { string description = 2; } -// Transition coverage represents the percentage of all possible transitions -// present within any of a parent's test cases. +// Transition coverage represents the percentage of all possible page +// transitions (page-level transition routes and event handlers, excluding +// transition route groups) present within any of a parent's test cases. message TransitionCoverage { // The source or target of a transition. message TransitionNode { @@ -344,7 +346,7 @@ message TransitionCoverage { } } - // A transition in the agent's graph. + // A transition in a page. message Transition { // The start node of a transition. TransitionNode source = 1; @@ -376,6 +378,41 @@ message TransitionCoverage { float coverage_score = 2; } +// Transition route group coverage represents the percentage of all possible +// transition routes present within any of a parent's test cases. The results +// are grouped by the transition route group. +message TransitionRouteGroupCoverage { + // Coverage result message for one transition route group. + message Coverage { + // A transition coverage in a transition route group. + message Transition { + // Intent route or condition route. + TransitionRoute transition_route = 1; + + // Whether or not the transition route is covered by at least one of the + // agent's test cases. + bool covered = 2; + } + + // Transition route group metadata. Only name and displayName will be set. + TransitionRouteGroup route_group = 1; + + // The list of transition routes and coverage in the transition route group. + repeated Transition transitions = 2; + + // The percent of transition routes in the transition route group that are + // covered. + float coverage_score = 3; + } + + // Transition route group coverages. + repeated Coverage coverages = 1; + + // The percent of transition routes in all the transition route groups that + // are covered. + float coverage_score = 2; +} + // Intent coverage represents the percentage of all possible intents in the // agent that are triggered in any of a parent's test cases. message IntentCoverage { @@ -408,8 +445,11 @@ message CalculateCoverageRequest { // Intent coverage. INTENT = 1; - // Page transition coverage + // Page transition coverage. PAGE_TRANSITION = 2; + + // Transition route group coverage. + TRANSITION_ROUTE_GROUP = 3; } // Required. The agent to calculate coverage for. @@ -438,8 +478,11 @@ message CalculateCoverageResponse { // Intent coverage. IntentCoverage intent_coverage = 2; - // Transition coverage. + // Transition (excluding transition route groups) coverage. TransitionCoverage transition_coverage = 4; + + // Transition route group coverage. + TransitionRouteGroupCoverage route_group_coverage = 6; } } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto index 13d62fdbdcb..341985b4ad8 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -130,7 +130,7 @@ message ListTransitionRouteGroupsRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 4; @@ -167,7 +167,7 @@ message GetTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 2; @@ -194,7 +194,7 @@ message CreateTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; @@ -214,7 +214,7 @@ message UpdateTransitionRouteGroupRequest { // // If not specified, the agent's default language is used. // [Many - // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) // are supported. // Note: languages must be enabled in the agent before they can be used. string language_code = 3; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto index 6c50177c34e..b80e4fa27d8 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto index 819a6d3cd59..9648a42773c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto index 3bc6735fdf5..8f94f30275e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index 95921f5d6b2..c7ac31dec95 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -5490,181 +5490,181 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a PlayAudio. */ - interface IPlayAudio { - - /** PlayAudio audioUri */ - audioUri?: (string|null); - - /** PlayAudio allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); + /** Properties of an EndInteraction. */ + interface IEndInteraction { } - /** Represents a PlayAudio. */ - class PlayAudio implements IPlayAudio { + /** Represents an EndInteraction. */ + class EndInteraction implements IEndInteraction { /** - * Constructs a new PlayAudio. + * Constructs a new EndInteraction. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio); - - /** PlayAudio audioUri. */ - public audioUri: string; - - /** PlayAudio allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + constructor(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction); /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new EndInteraction instance using the specified properties. * @param [properties] Properties to set - * @returns PlayAudio instance + * @returns EndInteraction instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; + public static create(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. - * @param message PlayAudio message or plain object to encode + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. - * @param message PlayAudio message or plain object to encode + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes an EndInteraction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlayAudio + * @returns EndInteraction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlayAudio + * @returns EndInteraction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; /** - * Verifies a PlayAudio message. + * Verifies an EndInteraction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlayAudio + * @returns EndInteraction */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. - * @param message PlayAudio + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @param message EndInteraction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlayAudio to JSON. + * Converts this EndInteraction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EndInteraction. */ - interface IEndInteraction { + /** Properties of a PlayAudio. */ + interface IPlayAudio { + + /** PlayAudio audioUri */ + audioUri?: (string|null); + + /** PlayAudio allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); } - /** Represents an EndInteraction. */ - class EndInteraction implements IEndInteraction { + /** Represents a PlayAudio. */ + class PlayAudio implements IPlayAudio { /** - * Constructs a new EndInteraction. + * Constructs a new PlayAudio. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction); + constructor(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio); + + /** PlayAudio audioUri. */ + public audioUri: string; + + /** PlayAudio allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; /** - * Creates a new EndInteraction instance using the specified properties. + * Creates a new PlayAudio instance using the specified properties. * @param [properties] Properties to set - * @returns EndInteraction instance + * @returns PlayAudio instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; + public static create(properties?: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * @param message PlayAudio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * @param message PlayAudio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a PlayAudio message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EndInteraction + * @returns PlayAudio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EndInteraction + * @returns PlayAudio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; /** - * Verifies an EndInteraction message. + * Verifies a PlayAudio message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EndInteraction + * @returns PlayAudio */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. - * @param message EndInteraction + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * @param message PlayAudio * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EndInteraction to JSON. + * Converts this PlayAudio to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -6572,14 +6572,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } - /** Properties of an OutputAudioConfig. */ interface IOutputAudioConfig { @@ -6682,6 +6674,14 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } + /** OutputAudioEncoding enum. */ enum OutputAudioEncoding { OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, @@ -17219,6 +17219,306 @@ export namespace google { } } + /** Properties of a TransitionRouteGroupCoverage. */ + interface ITransitionRouteGroupCoverage { + + /** TransitionRouteGroupCoverage coverages */ + coverages?: (google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage[]|null); + + /** TransitionRouteGroupCoverage coverageScore */ + coverageScore?: (number|null); + } + + /** Represents a TransitionRouteGroupCoverage. */ + class TransitionRouteGroupCoverage implements ITransitionRouteGroupCoverage { + + /** + * Constructs a new TransitionRouteGroupCoverage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage); + + /** TransitionRouteGroupCoverage coverages. */ + public coverages: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage[]; + + /** TransitionRouteGroupCoverage coverageScore. */ + public coverageScore: number; + + /** + * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * @param [properties] Properties to set + * @returns TransitionRouteGroupCoverage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage; + + /** + * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * @param message TransitionRouteGroupCoverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * @param message TransitionRouteGroupCoverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage; + + /** + * Verifies a TransitionRouteGroupCoverage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransitionRouteGroupCoverage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransitionRouteGroupCoverage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage; + + /** + * Creates a plain object from a TransitionRouteGroupCoverage message. Also converts values to other types if specified. + * @param message TransitionRouteGroupCoverage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransitionRouteGroupCoverage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TransitionRouteGroupCoverage { + + /** Properties of a Coverage. */ + interface ICoverage { + + /** Coverage routeGroup */ + routeGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** Coverage transitions */ + transitions?: (google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition[]|null); + + /** Coverage coverageScore */ + coverageScore?: (number|null); + } + + /** Represents a Coverage. */ + class Coverage implements ICoverage { + + /** + * Constructs a new Coverage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage); + + /** Coverage routeGroup. */ + public routeGroup?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null); + + /** Coverage transitions. */ + public transitions: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition[]; + + /** Coverage coverageScore. */ + public coverageScore: number; + + /** + * Creates a new Coverage instance using the specified properties. + * @param [properties] Properties to set + * @returns Coverage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage; + + /** + * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @param message Coverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @param message Coverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Coverage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage; + + /** + * Decodes a Coverage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage; + + /** + * Verifies a Coverage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Coverage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Coverage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage; + + /** + * Creates a plain object from a Coverage message. Also converts values to other types if specified. + * @param message Coverage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Coverage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Coverage { + + /** Properties of a Transition. */ + interface ITransition { + + /** Transition transitionRoute */ + transitionRoute?: (google.cloud.dialogflow.cx.v3.ITransitionRoute|null); + + /** Transition covered */ + covered?: (boolean|null); + } + + /** Represents a Transition. */ + class Transition implements ITransition { + + /** + * Constructs a new Transition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition); + + /** Transition transitionRoute. */ + public transitionRoute?: (google.cloud.dialogflow.cx.v3.ITransitionRoute|null); + + /** Transition covered. */ + public covered: boolean; + + /** + * Creates a new Transition instance using the specified properties. + * @param [properties] Properties to set + * @returns Transition instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @param message Transition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @param message Transition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Transition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Verifies a Transition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Transition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Creates a plain object from a Transition message. Also converts values to other types if specified. + * @param message Transition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Transition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + /** Properties of an IntentCoverage. */ interface IIntentCoverage { @@ -17516,7 +17816,8 @@ export namespace google { enum CoverageType { COVERAGE_TYPE_UNSPECIFIED = 0, INTENT = 1, - PAGE_TRANSITION = 2 + PAGE_TRANSITION = 2, + TRANSITION_ROUTE_GROUP = 3 } } @@ -17531,6 +17832,9 @@ export namespace google { /** CalculateCoverageResponse transitionCoverage */ transitionCoverage?: (google.cloud.dialogflow.cx.v3.ITransitionCoverage|null); + + /** CalculateCoverageResponse routeGroupCoverage */ + routeGroupCoverage?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage|null); } /** Represents a CalculateCoverageResponse. */ @@ -17551,8 +17855,11 @@ export namespace google { /** CalculateCoverageResponse transitionCoverage. */ public transitionCoverage?: (google.cloud.dialogflow.cx.v3.ITransitionCoverage|null); + /** CalculateCoverageResponse routeGroupCoverage. */ + public routeGroupCoverage?: (google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage|null); + /** CalculateCoverageResponse coverageType. */ - public coverageType?: ("intentCoverage"|"transitionCoverage"); + public coverageType?: ("intentCoverage"|"transitionCoverage"|"routeGroupCoverage"); /** * Creates a new CalculateCoverageResponse instance using the specified properties. @@ -22591,6 +22898,9 @@ export namespace google { /** WebhookRequest payload */ payload?: (google.protobuf.IStruct|null); + + /** WebhookRequest sentimentAnalysisResult */ + sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null); } /** Represents a WebhookRequest. */ @@ -22623,6 +22933,9 @@ export namespace google { /** WebhookRequest payload. */ public payload?: (google.protobuf.IStruct|null); + /** WebhookRequest sentimentAnalysisResult. */ + public sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null); + /** * Creates a new WebhookRequest instance using the specified properties. * @param [properties] Properties to set @@ -22992,6 +23305,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Properties of a SentimentAnalysisResult. */ + interface ISentimentAnalysisResult { + + /** SentimentAnalysisResult score */ + score?: (number|null); + + /** SentimentAnalysisResult magnitude */ + magnitude?: (number|null); + } + + /** Represents a SentimentAnalysisResult. */ + class SentimentAnalysisResult implements ISentimentAnalysisResult { + + /** + * Constructs a new SentimentAnalysisResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult); + + /** SentimentAnalysisResult score. */ + public score: number; + + /** SentimentAnalysisResult magnitude. */ + public magnitude: number; + + /** + * Creates a new SentimentAnalysisResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SentimentAnalysisResult instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult): google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult; + + /** + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.verify|verify} messages. + * @param message SentimentAnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.verify|verify} messages. + * @param message SentimentAnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SentimentAnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult; + + /** + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SentimentAnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult; + + /** + * Verifies a SentimentAnalysisResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SentimentAnalysisResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult; + + /** + * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. + * @param message SentimentAnalysisResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SentimentAnalysisResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a WebhookResponse. */ @@ -31035,14 +31444,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } - /** Properties of an OutputAudioConfig. */ interface IOutputAudioConfig { @@ -31145,6 +31546,14 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } + /** OutputAudioEncoding enum. */ enum OutputAudioEncoding { OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, @@ -37134,6 +37543,9 @@ export namespace google { /** QueryParameters parameters */ parameters?: (google.protobuf.IStruct|null); + /** QueryParameters disableWebhook */ + disableWebhook?: (boolean|null); + /** QueryParameters analyzeQueryTextSentiment */ analyzeQueryTextSentiment?: (boolean|null); @@ -37165,6 +37577,9 @@ export namespace google { /** QueryParameters parameters. */ public parameters?: (google.protobuf.IStruct|null); + /** QueryParameters disableWebhook. */ + public disableWebhook: boolean; + /** QueryParameters analyzeQueryTextSentiment. */ public analyzeQueryTextSentiment: boolean; @@ -40833,6 +41248,306 @@ export namespace google { } } + /** Properties of a TransitionRouteGroupCoverage. */ + interface ITransitionRouteGroupCoverage { + + /** TransitionRouteGroupCoverage coverages */ + coverages?: (google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage[]|null); + + /** TransitionRouteGroupCoverage coverageScore */ + coverageScore?: (number|null); + } + + /** Represents a TransitionRouteGroupCoverage. */ + class TransitionRouteGroupCoverage implements ITransitionRouteGroupCoverage { + + /** + * Constructs a new TransitionRouteGroupCoverage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage); + + /** TransitionRouteGroupCoverage coverages. */ + public coverages: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage[]; + + /** TransitionRouteGroupCoverage coverageScore. */ + public coverageScore: number; + + /** + * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * @param [properties] Properties to set + * @returns TransitionRouteGroupCoverage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage; + + /** + * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * @param message TransitionRouteGroupCoverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * @param message TransitionRouteGroupCoverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage; + + /** + * Verifies a TransitionRouteGroupCoverage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransitionRouteGroupCoverage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransitionRouteGroupCoverage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage; + + /** + * Creates a plain object from a TransitionRouteGroupCoverage message. Also converts values to other types if specified. + * @param message TransitionRouteGroupCoverage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransitionRouteGroupCoverage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TransitionRouteGroupCoverage { + + /** Properties of a Coverage. */ + interface ICoverage { + + /** Coverage routeGroup */ + routeGroup?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null); + + /** Coverage transitions */ + transitions?: (google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition[]|null); + + /** Coverage coverageScore */ + coverageScore?: (number|null); + } + + /** Represents a Coverage. */ + class Coverage implements ICoverage { + + /** + * Constructs a new Coverage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage); + + /** Coverage routeGroup. */ + public routeGroup?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null); + + /** Coverage transitions. */ + public transitions: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition[]; + + /** Coverage coverageScore. */ + public coverageScore: number; + + /** + * Creates a new Coverage instance using the specified properties. + * @param [properties] Properties to set + * @returns Coverage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage; + + /** + * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @param message Coverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @param message Coverage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Coverage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage; + + /** + * Decodes a Coverage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage; + + /** + * Verifies a Coverage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Coverage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Coverage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage; + + /** + * Creates a plain object from a Coverage message. Also converts values to other types if specified. + * @param message Coverage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Coverage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Coverage { + + /** Properties of a Transition. */ + interface ITransition { + + /** Transition transitionRoute */ + transitionRoute?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null); + + /** Transition covered */ + covered?: (boolean|null); + } + + /** Represents a Transition. */ + class Transition implements ITransition { + + /** + * Constructs a new Transition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition); + + /** Transition transitionRoute. */ + public transitionRoute?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null); + + /** Transition covered. */ + public covered: boolean; + + /** + * Creates a new Transition instance using the specified properties. + * @param [properties] Properties to set + * @returns Transition instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @param message Transition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @param message Transition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Transition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Verifies a Transition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Transition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition; + + /** + * Creates a plain object from a Transition message. Also converts values to other types if specified. + * @param message Transition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Transition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + /** Properties of an IntentCoverage. */ interface IIntentCoverage { @@ -41130,7 +41845,8 @@ export namespace google { enum CoverageType { COVERAGE_TYPE_UNSPECIFIED = 0, INTENT = 1, - PAGE_TRANSITION = 2 + PAGE_TRANSITION = 2, + TRANSITION_ROUTE_GROUP = 3 } } @@ -41145,6 +41861,9 @@ export namespace google { /** CalculateCoverageResponse transitionCoverage */ transitionCoverage?: (google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null); + + /** CalculateCoverageResponse routeGroupCoverage */ + routeGroupCoverage?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null); } /** Represents a CalculateCoverageResponse. */ @@ -41165,8 +41884,11 @@ export namespace google { /** CalculateCoverageResponse transitionCoverage. */ public transitionCoverage?: (google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null); + /** CalculateCoverageResponse routeGroupCoverage. */ + public routeGroupCoverage?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null); + /** CalculateCoverageResponse coverageType. */ - public coverageType?: ("intentCoverage"|"transitionCoverage"); + public coverageType?: ("intentCoverage"|"transitionCoverage"|"routeGroupCoverage"); /** * Creates a new CalculateCoverageResponse instance using the specified properties. diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index 94cf361e8ba..7258d8ea983 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -12765,25 +12765,23 @@ return OutputAudioText; })(); - ResponseMessage.PlayAudio = (function() { + ResponseMessage.EndInteraction = (function() { /** - * Properties of a PlayAudio. + * Properties of an EndInteraction. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IPlayAudio - * @property {string|null} [audioUri] PlayAudio audioUri - * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + * @interface IEndInteraction */ /** - * Constructs a new PlayAudio. + * Constructs a new EndInteraction. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents a PlayAudio. - * @implements IPlayAudio + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set */ - function PlayAudio(properties) { + function EndInteraction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12791,89 +12789,63 @@ } /** - * PlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - * @instance - */ - PlayAudio.prototype.audioUri = ""; - - /** - * PlayAudio allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio - * @instance - */ - PlayAudio.prototype.allowPlaybackInterruption = false; - - /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new EndInteraction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio instance + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction instance */ - PlayAudio.create = function create(properties) { - return new PlayAudio(properties); + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); }; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encode = function encode(message, writer) { + EndInteraction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); return writer; }; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes an EndInteraction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decode = function decode(reader, length) { + EndInteraction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.audioUri = reader.string(); - break; - case 2: - message.allowPlaybackInterruption = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -12883,115 +12855,95 @@ }; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decodeDelimited = function decodeDelimited(reader) { + EndInteraction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlayAudio message. + * Verifies an EndInteraction message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlayAudio.verify = function verify(message) { + EndInteraction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction */ - PlayAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; + return new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); }; /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} message PlayAudio + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} message EndInteraction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlayAudio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.audioUri = ""; - object.allowPlaybackInterruption = false; - } - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; - return object; + EndInteraction.toObject = function toObject() { + return {}; }; /** - * Converts this PlayAudio to JSON. + * Converts this EndInteraction to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction * @instance * @returns {Object.} JSON object */ - PlayAudio.prototype.toJSON = function toJSON() { + EndInteraction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PlayAudio; + return EndInteraction; })(); - ResponseMessage.EndInteraction = (function() { + ResponseMessage.PlayAudio = (function() { /** - * Properties of an EndInteraction. + * Properties of a PlayAudio. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @interface IEndInteraction + * @interface IPlayAudio + * @property {string|null} [audioUri] PlayAudio audioUri + * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption */ /** - * Constructs a new EndInteraction. + * Constructs a new PlayAudio. * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction + * @classdesc Represents a PlayAudio. + * @implements IPlayAudio * @constructor - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set */ - function EndInteraction(properties) { + function PlayAudio(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12999,63 +12951,89 @@ } /** - * Creates a new EndInteraction instance using the specified properties. + * PlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.audioUri = ""; + + /** + * PlayAudio allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.allowPlaybackInterruption = false; + + /** + * Creates a new PlayAudio instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction instance + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio instance */ - EndInteraction.create = function create(properties) { - return new EndInteraction(properties); + PlayAudio.create = function create(properties) { + return new PlayAudio(properties); }; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encode = function encode(message, writer) { + PlayAudio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); return writer; }; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a PlayAudio message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decode = function decode(reader, length) { + PlayAudio.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.audioUri = reader.string(); + break; + case 2: + message.allowPlaybackInterruption = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -13065,74 +13043,96 @@ }; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decodeDelimited = function decodeDelimited(reader) { + PlayAudio.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EndInteraction message. + * Verifies a PlayAudio message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EndInteraction.verify = function verify(message) { + PlayAudio.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} PlayAudio */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) + PlayAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) return object; - return new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(); + var message = new $root.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; }; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @static - * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction} message EndInteraction + * @param {google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio} message PlayAudio * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EndInteraction.toObject = function toObject() { - return {}; + PlayAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioUri = ""; + object.allowPlaybackInterruption = false; + } + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; }; /** - * Converts this EndInteraction to JSON. + * Converts this PlayAudio to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio * @instance * @returns {Object.} JSON object */ - EndInteraction.prototype.toJSON = function toJSON() { + PlayAudio.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EndInteraction; + return PlayAudio; })(); ResponseMessage.MixedAudio = (function() { @@ -15524,24 +15524,6 @@ return SynthesizeSpeechConfig; })(); - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; - })(); - v3.OutputAudioConfig = (function() { /** @@ -15812,6 +15794,24 @@ return OutputAudioConfig; })(); + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; + })(); + /** * OutputAudioEncoding enum. * @name google.cloud.dialogflow.cx.v3.OutputAudioEncoding @@ -40642,6 +40642,711 @@ return TransitionCoverage; })(); + v3.TransitionRouteGroupCoverage = (function() { + + /** + * Properties of a TransitionRouteGroupCoverage. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ITransitionRouteGroupCoverage + * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages + * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore + */ + + /** + * Constructs a new TransitionRouteGroupCoverage. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a TransitionRouteGroupCoverage. + * @implements ITransitionRouteGroupCoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set + */ + function TransitionRouteGroupCoverage(properties) { + this.coverages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransitionRouteGroupCoverage coverages. + * @member {Array.} coverages + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @instance + */ + TransitionRouteGroupCoverage.prototype.coverages = $util.emptyArray; + + /** + * TransitionRouteGroupCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @instance + */ + TransitionRouteGroupCoverage.prototype.coverageScore = 0; + + /** + * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance + */ + TransitionRouteGroupCoverage.create = function create(properties) { + return new TransitionRouteGroupCoverage(properties); + }; + + /** + * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroupCoverage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.coverages != null && message.coverages.length) + for (var i = 0; i < message.coverages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.encode(message.coverages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.coverageScore); + return writer; + }; + + /** + * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroupCoverage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.coverages && message.coverages.length)) + message.coverages = []; + message.coverages.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.decode(reader, reader.uint32())); + break; + case 2: + message.coverageScore = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroupCoverage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransitionRouteGroupCoverage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransitionRouteGroupCoverage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.coverages != null && message.hasOwnProperty("coverages")) { + if (!Array.isArray(message.coverages)) + return "coverages: array expected"; + for (var i = 0; i < message.coverages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.verify(message.coverages[i]); + if (error) + return "coverages." + error; + } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; + return null; + }; + + /** + * Creates a TransitionRouteGroupCoverage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + */ + TransitionRouteGroupCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage(); + if (object.coverages) { + if (!Array.isArray(object.coverages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.coverages: array expected"); + message.coverages = []; + for (var i = 0; i < object.coverages.length; ++i) { + if (typeof object.coverages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.coverages: object expected"); + message.coverages[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.fromObject(object.coverages[i]); + } + } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); + return message; + }; + + /** + * Creates a plain object from a TransitionRouteGroupCoverage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransitionRouteGroupCoverage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coverages = []; + if (options.defaults) + object.coverageScore = 0; + if (message.coverages && message.coverages.length) { + object.coverages = []; + for (var j = 0; j < message.coverages.length; ++j) + object.coverages[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.toObject(message.coverages[j], options); + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + return object; + }; + + /** + * Converts this TransitionRouteGroupCoverage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @instance + * @returns {Object.} JSON object + */ + TransitionRouteGroupCoverage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TransitionRouteGroupCoverage.Coverage = (function() { + + /** + * Properties of a Coverage. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @interface ICoverage + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [routeGroup] Coverage routeGroup + * @property {Array.|null} [transitions] Coverage transitions + * @property {number|null} [coverageScore] Coverage coverageScore + */ + + /** + * Constructs a new Coverage. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @classdesc Represents a Coverage. + * @implements ICoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + */ + function Coverage(properties) { + this.transitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coverage routeGroup. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} routeGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.routeGroup = null; + + /** + * Coverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.transitions = $util.emptyArray; + + /** + * Coverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.coverageScore = 0; + + /** + * Creates a new Coverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} Coverage instance + */ + Coverage.create = function create(properties) { + return new Coverage(properties); + }; + + /** + * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.routeGroup != null && Object.hasOwnProperty.call(message, "routeGroup")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.routeGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.transitions != null && message.transitions.length) + for (var i = 0; i < message.transitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.encode(message.transitions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.coverageScore); + return writer; + }; + + /** + * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coverage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.routeGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.transitions && message.transitions.length)) + message.transitions = []; + message.transitions.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.decode(reader, reader.uint32())); + break; + case 3: + message.coverageScore = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coverage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coverage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coverage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.routeGroup); + if (error) + return "routeGroup." + error; + } + if (message.transitions != null && message.hasOwnProperty("transitions")) { + if (!Array.isArray(message.transitions)) + return "transitions: array expected"; + for (var i = 0; i < message.transitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.verify(message.transitions[i]); + if (error) + return "transitions." + error; + } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; + return null; + }; + + /** + * Creates a Coverage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} Coverage + */ + Coverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage(); + if (object.routeGroup != null) { + if (typeof object.routeGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.routeGroup: object expected"); + message.routeGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.routeGroup); + } + if (object.transitions) { + if (!Array.isArray(object.transitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.transitions: array expected"); + message.transitions = []; + for (var i = 0; i < object.transitions.length; ++i) { + if (typeof object.transitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.transitions: object expected"); + message.transitions[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.fromObject(object.transitions[i]); + } + } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); + return message; + }; + + /** + * Creates a plain object from a Coverage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage} message Coverage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coverage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transitions = []; + if (options.defaults) { + object.routeGroup = null; + object.coverageScore = 0; + } + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) + object.routeGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.routeGroup, options); + if (message.transitions && message.transitions.length) { + object.transitions = []; + for (var j = 0; j < message.transitions.length; ++j) + object.transitions[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.toObject(message.transitions[j], options); + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + return object; + }; + + /** + * Converts this Coverage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + * @returns {Object.} JSON object + */ + Coverage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Coverage.Transition = (function() { + + /** + * Properties of a Transition. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @interface ITransition + * @property {google.cloud.dialogflow.cx.v3.ITransitionRoute|null} [transitionRoute] Transition transitionRoute + * @property {boolean|null} [covered] Transition covered + */ + + /** + * Constructs a new Transition. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @classdesc Represents a Transition. + * @implements ITransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + */ + function Transition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Transition transitionRoute. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRoute|null|undefined} transitionRoute + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.transitionRoute = null; + + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.covered = false; + + /** + * Creates a new Transition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} Transition instance + */ + Transition.create = function create(properties) { + return new Transition(properties); + }; + + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); + return writer; + }; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32()); + break; + case 2: + message.covered = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoute); + if (error) + return "transitionRoute." + error; + } + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + return null; + }; + + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} Transition + */ + Transition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition(); + if (object.transitionRoute != null) { + if (typeof object.transitionRoute !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition.transitionRoute: object expected"); + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoute); + } + if (object.covered != null) + message.covered = Boolean(object.covered); + return message; + }; + + /** + * Creates a plain object from a Transition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition} message Transition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.transitionRoute = null; + object.covered = false; + } + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) + object.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoute, options); + if (message.covered != null && message.hasOwnProperty("covered")) + object.covered = message.covered; + return object; + }; + + /** + * Converts this Transition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + * @returns {Object.} JSON object + */ + Transition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Transition; + })(); + + return Coverage; + })(); + + return TransitionRouteGroupCoverage; + })(); + v3.IntentCoverage = (function() { /** @@ -41237,6 +41942,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -41269,6 +41975,10 @@ case 2: message.type = 2; break; + case "TRANSITION_ROUTE_GROUP": + case 3: + message.type = 3; + break; } return message; }; @@ -41315,12 +42025,14 @@ * @property {number} COVERAGE_TYPE_UNSPECIFIED=0 COVERAGE_TYPE_UNSPECIFIED value * @property {number} INTENT=1 INTENT value * @property {number} PAGE_TRANSITION=2 PAGE_TRANSITION value + * @property {number} TRANSITION_ROUTE_GROUP=3 TRANSITION_ROUTE_GROUP value */ CalculateCoverageRequest.CoverageType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "COVERAGE_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "INTENT"] = 1; values[valuesById[2] = "PAGE_TRANSITION"] = 2; + values[valuesById[3] = "TRANSITION_ROUTE_GROUP"] = 3; return values; })(); @@ -41336,6 +42048,7 @@ * @property {string|null} [agent] CalculateCoverageResponse agent * @property {google.cloud.dialogflow.cx.v3.IIntentCoverage|null} [intentCoverage] CalculateCoverageResponse intentCoverage * @property {google.cloud.dialogflow.cx.v3.ITransitionCoverage|null} [transitionCoverage] CalculateCoverageResponse transitionCoverage + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage|null} [routeGroupCoverage] CalculateCoverageResponse routeGroupCoverage */ /** @@ -41377,17 +42090,25 @@ */ CalculateCoverageResponse.prototype.transitionCoverage = null; + /** + * CalculateCoverageResponse routeGroupCoverage. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage|null|undefined} routeGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @instance + */ + CalculateCoverageResponse.prototype.routeGroupCoverage = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * CalculateCoverageResponse coverageType. - * @member {"intentCoverage"|"transitionCoverage"|undefined} coverageType + * @member {"intentCoverage"|"transitionCoverage"|"routeGroupCoverage"|undefined} coverageType * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @instance */ Object.defineProperty(CalculateCoverageResponse.prototype, "coverageType", { - get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage"]), + get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage", "routeGroupCoverage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -41421,6 +42142,8 @@ $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.encode(message.transitionCoverage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.agent); + if (message.routeGroupCoverage != null && Object.hasOwnProperty.call(message, "routeGroupCoverage")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.encode(message.routeGroupCoverage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -41464,6 +42187,9 @@ case 4: message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.decode(reader, reader.uint32()); break; + case 6: + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -41521,6 +42247,16 @@ return "transitionCoverage." + error; } } + if (message.routeGroupCoverage != null && message.hasOwnProperty("routeGroupCoverage")) { + if (properties.coverageType === 1) + return "coverageType: multiple values"; + properties.coverageType = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify(message.routeGroupCoverage); + if (error) + return "routeGroupCoverage." + error; + } + } return null; }; @@ -41548,6 +42284,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.transitionCoverage: object expected"); message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.fromObject(object.transitionCoverage); } + if (object.routeGroupCoverage != null) { + if (typeof object.routeGroupCoverage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.routeGroupCoverage: object expected"); + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.fromObject(object.routeGroupCoverage); + } return message; }; @@ -41578,6 +42319,11 @@ } if (message.agent != null && message.hasOwnProperty("agent")) object.agent = message.agent; + if (message.routeGroupCoverage != null && message.hasOwnProperty("routeGroupCoverage")) { + object.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.toObject(message.routeGroupCoverage, options); + if (options.oneofs) + object.coverageType = "routeGroupCoverage"; + } return object; }; @@ -52718,6 +53464,7 @@ * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookRequest sessionInfo * @property {Array.|null} [messages] WebhookRequest messages * @property {google.protobuf.IStruct|null} [payload] WebhookRequest payload + * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null} [sentimentAnalysisResult] WebhookRequest sentimentAnalysisResult */ /** @@ -52792,6 +53539,14 @@ */ WebhookRequest.prototype.payload = null; + /** + * WebhookRequest sentimentAnalysisResult. + * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.sentimentAnalysisResult = null; + /** * Creates a new WebhookRequest instance using the specified properties. * @function create @@ -52831,6 +53586,8 @@ $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -52888,6 +53645,9 @@ case 8: message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; + case 9: + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -52960,6 +53720,11 @@ if (error) return "payload." + error; } + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); + if (error) + return "sentimentAnalysisResult." + error; + } return null; }; @@ -53012,6 +53777,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.payload: object expected"); message.payload = $root.google.protobuf.Struct.fromObject(object.payload); } + if (object.sentimentAnalysisResult != null) { + if (typeof object.sentimentAnalysisResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.sentimentAnalysisResult: object expected"); + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); + } return message; }; @@ -53037,6 +53807,7 @@ object.sessionInfo = null; object.fulfillmentInfo = null; object.payload = null; + object.sentimentAnalysisResult = null; } if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) object.detectIntentResponseId = message.detectIntentResponseId; @@ -53055,6 +53826,8 @@ } if (message.payload != null && message.hasOwnProperty("payload")) object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) + object.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); return object; }; @@ -53768,6 +54541,216 @@ return IntentInfo; })(); + WebhookRequest.SentimentAnalysisResult = (function() { + + /** + * Properties of a SentimentAnalysisResult. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @interface ISentimentAnalysisResult + * @property {number|null} [score] SentimentAnalysisResult score + * @property {number|null} [magnitude] SentimentAnalysisResult magnitude + */ + + /** + * Constructs a new SentimentAnalysisResult. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @classdesc Represents a SentimentAnalysisResult. + * @implements ISentimentAnalysisResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult=} [properties] Properties to set + */ + function SentimentAnalysisResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SentimentAnalysisResult score. + * @member {number} score + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @instance + */ + SentimentAnalysisResult.prototype.score = 0; + + /** + * SentimentAnalysisResult magnitude. + * @member {number} magnitude + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @instance + */ + SentimentAnalysisResult.prototype.magnitude = 0; + + /** + * Creates a new SentimentAnalysisResult instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} SentimentAnalysisResult instance + */ + SentimentAnalysisResult.create = function create(properties) { + return new SentimentAnalysisResult(properties); + }; + + /** + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SentimentAnalysisResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.magnitude); + return writer; + }; + + /** + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} SentimentAnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SentimentAnalysisResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.score = reader.float(); + break; + case 2: + message.magnitude = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} SentimentAnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SentimentAnalysisResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SentimentAnalysisResult message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SentimentAnalysisResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; + return null; + }; + + /** + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} SentimentAnalysisResult + */ + SentimentAnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); + return message; + }; + + /** + * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult} message SentimentAnalysisResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SentimentAnalysisResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.score = 0; + object.magnitude = 0; + } + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; + return object; + }; + + /** + * Converts this SentimentAnalysisResult to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @instance + * @returns {Object.} JSON object + */ + SentimentAnalysisResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SentimentAnalysisResult; + })(); + return WebhookRequest; })(); @@ -72756,24 +73739,6 @@ return SynthesizeSpeechConfig; })(); - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3beta1.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; - })(); - v3beta1.OutputAudioConfig = (function() { /** @@ -73044,6 +74009,24 @@ return OutputAudioConfig; })(); + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3beta1.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; + })(); + /** * OutputAudioEncoding enum. * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding @@ -86846,6 +87829,7 @@ * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters + * @property {boolean|null} [disableWebhook] QueryParameters disableWebhook * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders */ @@ -86907,6 +87891,14 @@ */ QueryParameters.prototype.parameters = null; + /** + * QueryParameters disableWebhook. + * @member {boolean} disableWebhook + * @memberof google.cloud.dialogflow.cx.v3beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.disableWebhook = false; + /** * QueryParameters analyzeQueryTextSentiment. * @member {boolean} analyzeQueryTextSentiment @@ -86958,6 +87950,8 @@ $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disableWebhook != null && Object.hasOwnProperty.call(message, "disableWebhook")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.disableWebhook); if (message.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.analyzeQueryTextSentiment); if (message.webhookHeaders != null && Object.hasOwnProperty.call(message, "webhookHeaders")) @@ -87014,6 +88008,9 @@ case 5: message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; + case 7: + message.disableWebhook = reader.bool(); + break; case 8: message.analyzeQueryTextSentiment = reader.bool(); break; @@ -87101,6 +88098,9 @@ if (error) return "parameters." + error; } + if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) + if (typeof message.disableWebhook !== "boolean") + return "disableWebhook: boolean expected"; if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) if (typeof message.analyzeQueryTextSentiment !== "boolean") return "analyzeQueryTextSentiment: boolean expected"; @@ -87154,6 +88154,8 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.QueryParameters.parameters: object expected"); message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); } + if (object.disableWebhook != null) + message.disableWebhook = Boolean(object.disableWebhook); if (object.analyzeQueryTextSentiment != null) message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); if (object.webhookHeaders) { @@ -87188,6 +88190,7 @@ object.geoLocation = null; object.payload = null; object.parameters = null; + object.disableWebhook = false; object.analyzeQueryTextSentiment = false; } if (message.timeZone != null && message.hasOwnProperty("timeZone")) @@ -87203,6 +88206,8 @@ object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); if (message.parameters != null && message.hasOwnProperty("parameters")) object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) + object.disableWebhook = message.disableWebhook; if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; var keys2; @@ -95955,6 +96960,711 @@ return TransitionCoverage; })(); + v3beta1.TransitionRouteGroupCoverage = (function() { + + /** + * Properties of a TransitionRouteGroupCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ITransitionRouteGroupCoverage + * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages + * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore + */ + + /** + * Constructs a new TransitionRouteGroupCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TransitionRouteGroupCoverage. + * @implements ITransitionRouteGroupCoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set + */ + function TransitionRouteGroupCoverage(properties) { + this.coverages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransitionRouteGroupCoverage coverages. + * @member {Array.} coverages + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @instance + */ + TransitionRouteGroupCoverage.prototype.coverages = $util.emptyArray; + + /** + * TransitionRouteGroupCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @instance + */ + TransitionRouteGroupCoverage.prototype.coverageScore = 0; + + /** + * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance + */ + TransitionRouteGroupCoverage.create = function create(properties) { + return new TransitionRouteGroupCoverage(properties); + }; + + /** + * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroupCoverage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.coverages != null && message.coverages.length) + for (var i = 0; i < message.coverages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.encode(message.coverages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.coverageScore); + return writer; + }; + + /** + * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroupCoverage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.coverages && message.coverages.length)) + message.coverages = []; + message.coverages.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.decode(reader, reader.uint32())); + break; + case 2: + message.coverageScore = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroupCoverage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransitionRouteGroupCoverage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransitionRouteGroupCoverage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.coverages != null && message.hasOwnProperty("coverages")) { + if (!Array.isArray(message.coverages)) + return "coverages: array expected"; + for (var i = 0; i < message.coverages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify(message.coverages[i]); + if (error) + return "coverages." + error; + } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; + return null; + }; + + /** + * Creates a TransitionRouteGroupCoverage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + */ + TransitionRouteGroupCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); + if (object.coverages) { + if (!Array.isArray(object.coverages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: array expected"); + message.coverages = []; + for (var i = 0; i < object.coverages.length; ++i) { + if (typeof object.coverages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: object expected"); + message.coverages[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.fromObject(object.coverages[i]); + } + } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); + return message; + }; + + /** + * Creates a plain object from a TransitionRouteGroupCoverage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransitionRouteGroupCoverage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coverages = []; + if (options.defaults) + object.coverageScore = 0; + if (message.coverages && message.coverages.length) { + object.coverages = []; + for (var j = 0; j < message.coverages.length; ++j) + object.coverages[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.toObject(message.coverages[j], options); + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + return object; + }; + + /** + * Converts this TransitionRouteGroupCoverage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @instance + * @returns {Object.} JSON object + */ + TransitionRouteGroupCoverage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TransitionRouteGroupCoverage.Coverage = (function() { + + /** + * Properties of a Coverage. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @interface ICoverage + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null} [routeGroup] Coverage routeGroup + * @property {Array.|null} [transitions] Coverage transitions + * @property {number|null} [coverageScore] Coverage coverageScore + */ + + /** + * Constructs a new Coverage. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @classdesc Represents a Coverage. + * @implements ICoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + */ + function Coverage(properties) { + this.transitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coverage routeGroup. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null|undefined} routeGroup + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.routeGroup = null; + + /** + * Coverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.transitions = $util.emptyArray; + + /** + * Coverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.coverageScore = 0; + + /** + * Creates a new Coverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage instance + */ + Coverage.create = function create(properties) { + return new Coverage(properties); + }; + + /** + * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.routeGroup != null && Object.hasOwnProperty.call(message, "routeGroup")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.encode(message.routeGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.transitions != null && message.transitions.length) + for (var i = 0; i < message.transitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.encode(message.transitions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.coverageScore); + return writer; + }; + + /** + * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coverage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.transitions && message.transitions.length)) + message.transitions = []; + message.transitions.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.decode(reader, reader.uint32())); + break; + case 3: + message.coverageScore = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coverage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coverage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coverage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.verify(message.routeGroup); + if (error) + return "routeGroup." + error; + } + if (message.transitions != null && message.hasOwnProperty("transitions")) { + if (!Array.isArray(message.transitions)) + return "transitions: array expected"; + for (var i = 0; i < message.transitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify(message.transitions[i]); + if (error) + return "transitions." + error; + } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; + return null; + }; + + /** + * Creates a Coverage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + */ + Coverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); + if (object.routeGroup != null) { + if (typeof object.routeGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.routeGroup: object expected"); + message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.fromObject(object.routeGroup); + } + if (object.transitions) { + if (!Array.isArray(object.transitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: array expected"); + message.transitions = []; + for (var i = 0; i < object.transitions.length; ++i) { + if (typeof object.transitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: object expected"); + message.transitions[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.fromObject(object.transitions[i]); + } + } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); + return message; + }; + + /** + * Creates a plain object from a Coverage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} message Coverage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coverage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transitions = []; + if (options.defaults) { + object.routeGroup = null; + object.coverageScore = 0; + } + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) + object.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.toObject(message.routeGroup, options); + if (message.transitions && message.transitions.length) { + object.transitions = []; + for (var j = 0; j < message.transitions.length; ++j) + object.transitions[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.toObject(message.transitions[j], options); + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + return object; + }; + + /** + * Converts this Coverage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + * @returns {Object.} JSON object + */ + Coverage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Coverage.Transition = (function() { + + /** + * Properties of a Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @interface ITransition + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null} [transitionRoute] Transition transitionRoute + * @property {boolean|null} [covered] Transition covered + */ + + /** + * Constructs a new Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @classdesc Represents a Transition. + * @implements ITransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + */ + function Transition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Transition transitionRoute. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null|undefined} transitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.transitionRoute = null; + + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.covered = false; + + /** + * Creates a new Transition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition instance + */ + Transition.create = function create(properties) { + return new Transition(properties); + }; + + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); + return writer; + }; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32()); + break; + case 2: + message.covered = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoute); + if (error) + return "transitionRoute." + error; + } + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + return null; + }; + + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + */ + Transition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); + if (object.transitionRoute != null) { + if (typeof object.transitionRoute !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.transitionRoute: object expected"); + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoute); + } + if (object.covered != null) + message.covered = Boolean(object.covered); + return message; + }; + + /** + * Creates a plain object from a Transition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} message Transition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.transitionRoute = null; + object.covered = false; + } + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) + object.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoute, options); + if (message.covered != null && message.hasOwnProperty("covered")) + object.covered = message.covered; + return object; + }; + + /** + * Converts this Transition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + * @returns {Object.} JSON object + */ + Transition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Transition; + })(); + + return Coverage; + })(); + + return TransitionRouteGroupCoverage; + })(); + v3beta1.IntentCoverage = (function() { /** @@ -96550,6 +98260,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -96582,6 +98293,10 @@ case 2: message.type = 2; break; + case "TRANSITION_ROUTE_GROUP": + case 3: + message.type = 3; + break; } return message; }; @@ -96628,12 +98343,14 @@ * @property {number} COVERAGE_TYPE_UNSPECIFIED=0 COVERAGE_TYPE_UNSPECIFIED value * @property {number} INTENT=1 INTENT value * @property {number} PAGE_TRANSITION=2 PAGE_TRANSITION value + * @property {number} TRANSITION_ROUTE_GROUP=3 TRANSITION_ROUTE_GROUP value */ CalculateCoverageRequest.CoverageType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "COVERAGE_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "INTENT"] = 1; values[valuesById[2] = "PAGE_TRANSITION"] = 2; + values[valuesById[3] = "TRANSITION_ROUTE_GROUP"] = 3; return values; })(); @@ -96649,6 +98366,7 @@ * @property {string|null} [agent] CalculateCoverageResponse agent * @property {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage|null} [intentCoverage] CalculateCoverageResponse intentCoverage * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null} [transitionCoverage] CalculateCoverageResponse transitionCoverage + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null} [routeGroupCoverage] CalculateCoverageResponse routeGroupCoverage */ /** @@ -96690,17 +98408,25 @@ */ CalculateCoverageResponse.prototype.transitionCoverage = null; + /** + * CalculateCoverageResponse routeGroupCoverage. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null|undefined} routeGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + * @instance + */ + CalculateCoverageResponse.prototype.routeGroupCoverage = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * CalculateCoverageResponse coverageType. - * @member {"intentCoverage"|"transitionCoverage"|undefined} coverageType + * @member {"intentCoverage"|"transitionCoverage"|"routeGroupCoverage"|undefined} coverageType * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @instance */ Object.defineProperty(CalculateCoverageResponse.prototype, "coverageType", { - get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage"]), + get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage", "routeGroupCoverage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -96734,6 +98460,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.encode(message.transitionCoverage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.agent); + if (message.routeGroupCoverage != null && Object.hasOwnProperty.call(message, "routeGroupCoverage")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.encode(message.routeGroupCoverage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -96777,6 +98505,9 @@ case 4: message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.decode(reader, reader.uint32()); break; + case 6: + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -96834,6 +98565,16 @@ return "transitionCoverage." + error; } } + if (message.routeGroupCoverage != null && message.hasOwnProperty("routeGroupCoverage")) { + if (properties.coverageType === 1) + return "coverageType: multiple values"; + properties.coverageType = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify(message.routeGroupCoverage); + if (error) + return "routeGroupCoverage." + error; + } + } return null; }; @@ -96861,6 +98602,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.transitionCoverage: object expected"); message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.fromObject(object.transitionCoverage); } + if (object.routeGroupCoverage != null) { + if (typeof object.routeGroupCoverage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.routeGroupCoverage: object expected"); + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.fromObject(object.routeGroupCoverage); + } return message; }; @@ -96891,6 +98637,11 @@ } if (message.agent != null && message.hasOwnProperty("agent")) object.agent = message.agent; + if (message.routeGroupCoverage != null && message.hasOwnProperty("routeGroupCoverage")) { + object.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.toObject(message.routeGroupCoverage, options); + if (options.oneofs) + object.coverageType = "routeGroupCoverage"; + } return object; }; diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index 09bd9cc74ab..9375094f474 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -1529,6 +1529,9 @@ } } }, + "EndInteraction": { + "fields": {} + }, "PlayAudio": { "fields": { "audioUri": { @@ -1547,9 +1550,6 @@ } } }, - "EndInteraction": { - "fields": {} - }, "MixedAudio": { "fields": { "segments": { @@ -1772,14 +1772,6 @@ } } }, - "SsmlVoiceGender": { - "values": { - "SSML_VOICE_GENDER_UNSPECIFIED": 0, - "SSML_VOICE_GENDER_MALE": 1, - "SSML_VOICE_GENDER_FEMALE": 2, - "SSML_VOICE_GENDER_NEUTRAL": 3 - } - }, "OutputAudioConfig": { "fields": { "audioEncoding": { @@ -1799,6 +1791,14 @@ } } }, + "SsmlVoiceGender": { + "values": { + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3 + } + }, "OutputAudioEncoding": { "values": { "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, @@ -4480,7 +4480,7 @@ "requestType": "RunTestCaseRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v3/projects/*/locations/*/agents/*/testCases:run", + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "RunTestCaseResponse", "(google.longrunning.operation_info).metadata_type": "RunTestCaseMetadata" @@ -4488,7 +4488,7 @@ "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/projects/*/locations/*/agents/*/testCases:run", + "post": "/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run", "body": "*" } }, @@ -4866,6 +4866,52 @@ } } }, + "TransitionRouteGroupCoverage": { + "fields": { + "coverages": { + "rule": "repeated", + "type": "Coverage", + "id": 1 + }, + "coverageScore": { + "type": "float", + "id": 2 + } + }, + "nested": { + "Coverage": { + "fields": { + "routeGroup": { + "type": "TransitionRouteGroup", + "id": 1 + }, + "transitions": { + "rule": "repeated", + "type": "Transition", + "id": 2 + }, + "coverageScore": { + "type": "float", + "id": 3 + } + }, + "nested": { + "Transition": { + "fields": { + "transitionRoute": { + "type": "TransitionRoute", + "id": 1 + }, + "covered": { + "type": "bool", + "id": 2 + } + } + } + } + } + } + }, "IntentCoverage": { "fields": { "intents": { @@ -4919,7 +4965,8 @@ "values": { "COVERAGE_TYPE_UNSPECIFIED": 0, "INTENT": 1, - "PAGE_TRANSITION": 2 + "PAGE_TRANSITION": 2, + "TRANSITION_ROUTE_GROUP": 3 } } } @@ -4929,7 +4976,8 @@ "coverageType": { "oneof": [ "intentCoverage", - "transitionCoverage" + "transitionCoverage", + "routeGroupCoverage" ] } }, @@ -4948,6 +4996,10 @@ "transitionCoverage": { "type": "TransitionCoverage", "id": 4 + }, + "routeGroupCoverage": { + "type": "TransitionRouteGroupCoverage", + "id": 6 } } }, @@ -6179,6 +6231,10 @@ "payload": { "type": "google.protobuf.Struct", "id": 8 + }, + "sentimentAnalysisResult": { + "type": "SentimentAnalysisResult", + "id": 9 } }, "nested": { @@ -6227,6 +6283,18 @@ } } } + }, + "SentimentAnalysisResult": { + "fields": { + "score": { + "type": "float", + "id": 1 + }, + "magnitude": { + "type": "float", + "id": 2 + } + } } } }, @@ -8406,14 +8474,6 @@ } } }, - "SsmlVoiceGender": { - "values": { - "SSML_VOICE_GENDER_UNSPECIFIED": 0, - "SSML_VOICE_GENDER_MALE": 1, - "SSML_VOICE_GENDER_FEMALE": 2, - "SSML_VOICE_GENDER_NEUTRAL": 3 - } - }, "OutputAudioConfig": { "fields": { "audioEncoding": { @@ -8433,6 +8493,14 @@ } } }, + "SsmlVoiceGender": { + "values": { + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3 + } + }, "OutputAudioEncoding": { "values": { "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, @@ -10141,6 +10209,10 @@ "type": "google.protobuf.Struct", "id": 5 }, + "disableWebhook": { + "type": "bool", + "id": 7 + }, "analyzeQueryTextSentiment": { "type": "bool", "id": 8 @@ -10848,7 +10920,7 @@ "requestType": "RunTestCaseRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v3beta1/projects/*/locations/*/agents/*/testCases:run", + "(google.api.http).post": "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*}:run", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "RunTestCaseResponse", "(google.longrunning.operation_info).metadata_type": "RunTestCaseMetadata" @@ -10856,7 +10928,7 @@ "parsedOptions": [ { "(google.api.http)": { - "post": "/v3beta1/projects/*/locations/*/agents/*/testCases:run", + "post": "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*}:run", "body": "*" } }, @@ -11234,6 +11306,52 @@ } } }, + "TransitionRouteGroupCoverage": { + "fields": { + "coverages": { + "rule": "repeated", + "type": "Coverage", + "id": 1 + }, + "coverageScore": { + "type": "float", + "id": 2 + } + }, + "nested": { + "Coverage": { + "fields": { + "routeGroup": { + "type": "TransitionRouteGroup", + "id": 1 + }, + "transitions": { + "rule": "repeated", + "type": "Transition", + "id": 2 + }, + "coverageScore": { + "type": "float", + "id": 3 + } + }, + "nested": { + "Transition": { + "fields": { + "transitionRoute": { + "type": "TransitionRoute", + "id": 1 + }, + "covered": { + "type": "bool", + "id": 2 + } + } + } + } + } + } + }, "IntentCoverage": { "fields": { "intents": { @@ -11287,7 +11405,8 @@ "values": { "COVERAGE_TYPE_UNSPECIFIED": 0, "INTENT": 1, - "PAGE_TRANSITION": 2 + "PAGE_TRANSITION": 2, + "TRANSITION_ROUTE_GROUP": 3 } } } @@ -11297,7 +11416,8 @@ "coverageType": { "oneof": [ "intentCoverage", - "transitionCoverage" + "transitionCoverage", + "routeGroupCoverage" ] } }, @@ -11316,6 +11436,10 @@ "transitionCoverage": { "type": "TransitionCoverage", "id": 4 + }, + "routeGroupCoverage": { + "type": "TransitionRouteGroupCoverage", + "id": 6 } } }, diff --git a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts index 2b0ca8a7ea6..e498bf08f78 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts @@ -421,7 +421,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -528,7 +528,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -632,7 +632,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -846,7 +846,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -929,7 +929,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -990,7 +990,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize diff --git a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts index 7c31f5cc4ab..de470cd893a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts @@ -459,7 +459,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -666,7 +666,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -770,7 +770,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1228,7 +1228,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1310,7 +1310,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1370,7 +1370,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] diff --git a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts index 446e6697ca9..2dbd693ba68 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts @@ -415,7 +415,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -518,7 +518,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -620,7 +620,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -822,7 +822,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3.IntentView} request.intentView @@ -905,7 +905,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3.IntentView} request.intentView @@ -966,7 +966,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3.IntentView} request.intentView diff --git a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts index 3d0d5cafe3f..cf2afdb7f1c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts @@ -420,7 +420,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -529,7 +529,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -636,7 +636,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -855,7 +855,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -942,7 +942,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -1007,7 +1007,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize diff --git a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts index 78dd04d12d2..65a39e3a6d2 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts @@ -1041,6 +1041,13 @@ export class TestCasesClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.runTestCase(request, options, callback); } diff --git a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts index 2576709104d..c39291a703e 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts @@ -423,7 +423,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -539,7 +539,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -653,7 +653,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -882,7 +882,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -967,7 +967,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1026,7 +1026,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts index e4d676bdd62..e615c6f9a34 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts @@ -424,7 +424,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -537,7 +537,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -647,7 +647,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -870,7 +870,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -953,7 +953,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -1014,7 +1014,7 @@ export class EntityTypesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts index c289af48c73..277763efd30 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts @@ -459,7 +459,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -670,7 +670,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -776,7 +776,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1240,7 +1240,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1322,7 +1322,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1382,7 +1382,7 @@ export class FlowsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts index c7431a7b5ca..2ec18e72407 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts @@ -419,7 +419,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -527,7 +527,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -635,7 +635,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -846,7 +846,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3beta1.IntentView} request.intentView @@ -929,7 +929,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3beta1.IntentView} request.intentView @@ -990,7 +990,7 @@ export class IntentsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.cloud.dialogflow.cx.v3beta1.IntentView} request.intentView diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts index 1c868961405..7e41ad01e9d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts @@ -424,7 +424,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -535,7 +535,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -642,7 +642,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {google.protobuf.FieldMask} request.updateMask @@ -861,7 +861,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -948,7 +948,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize @@ -1013,7 +1013,7 @@ export class PagesClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {number} request.pageSize diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts index 4ca1eef3c4f..7b8eb782a0a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts @@ -1053,6 +1053,13 @@ export class TestCasesClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.runTestCase(request, options, callback); } diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts index 58fb0e9e746..5345cff3d50 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts @@ -423,7 +423,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -539,7 +539,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -653,7 +653,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -882,7 +882,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -967,7 +967,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] @@ -1026,7 +1026,7 @@ export class TransitionRouteGroupsClient { * * If not specified, the agent's default language is used. * [Many - * languages](https://cloud.google.com/dialogflow/docs/reference/language) + * languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) * are supported. * Note: languages must be enabled in the agent before they can be used. * @param {object} [options] diff --git a/packages/google-cloud-dialogflow-cx/synth.metadata b/packages/google-cloud-dialogflow-cx/synth.metadata index b0856a19c20..0f73af5a354 100644 --- a/packages/google-cloud-dialogflow-cx/synth.metadata +++ b/packages/google-cloud-dialogflow-cx/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-dialogflow-cx.git", - "sha": "fae01469eed585596dcc935d9a50453cc8c6adf1" + "sha": "e55908cd0056b1c0b5b0a1ccf9d417ed5f66e733" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e28aa8570dc86136fe677202c976f4ee00d77f61", - "internalRef": "356624136" + "sha": "718eadce2fcaa3c4246ab56b6a507096cb100950", + "internalRef": "359860671" } }, { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts index 1c512a17de3..d98161c1c5f 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts @@ -801,7 +801,15 @@ describe('v3.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -825,7 +833,15 @@ describe('v3.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -872,7 +888,15 @@ describe('v3.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runTestCase = stubLongRunningCall( undefined, @@ -895,7 +919,15 @@ describe('v3.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runTestCase = stubLongRunningCall( undefined, diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts index b554b71860f..fd0a6b86b70 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts @@ -801,7 +801,15 @@ describe('v3beta1.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -825,7 +833,15 @@ describe('v3beta1.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -872,7 +888,15 @@ describe('v3beta1.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runTestCase = stubLongRunningCall( undefined, @@ -895,7 +919,15 @@ describe('v3beta1.TestCasesClient', () => { const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runTestCase = stubLongRunningCall( undefined,